Doubts related to server based timer

A

archana

Hi all,

I want to clear one doubt which i am facing regarding timer.

Suppose i have one timer in which i am generating some files. and
interval of my timer is say 5 min.

Say suppose at then my files are generated at time 12:30 am and then
as i set interval to 5 next file should gets generated to 12:35 but
what if i change my system time to 12:25 or 12:34.

So will my timer gets affected and if i reset timer to 12:32 at 12:30
will my files get generated at 12:37 or as 12:35.

Please clear my doubts.

Thanks in advance.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

archana said:
Hi all,

I want to clear one doubt which i am facing regarding timer.

Suppose i have one timer in which i am generating some files. and
interval of my timer is say 5 min.

Say suppose at then my files are generated at time 12:30 am and then
as i set interval to 5 next file should gets generated to 12:35 but
what if i change my system time to 12:25 or 12:34.

So will my timer gets affected and if i reset timer to 12:32 at 12:30
will my files get generated at 12:37 or as 12:35.

Please clear my doubts.

Did you try to run it ? The above questions can be easily answered by doing
that test.

I think that the timer works with an offset , it does't really care about
the time in the system but about a given number of miliseconds from the time
you started running it.
Again, a simple test will tel you how it does work in reality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top