I have a periodic task and I need to pause it for a undefined time.
but when the periodic task is restarted it should remember the time that spent since the last periodic event till the begining of the undefined time,this way the first periodic event should be shorter than normal.
can it be implemented with a Timer object?
atherwise how can i do?
What you can do is use thread.sleep to sleep for whatever amount of time you want it to wait for. Then have that placed inside of a while loop and have a counter to determine how many times it goes through till your condition it met. So something like this.
That is what I would do. Of course when your done time will be in seconds so you can adjust for your needs