G
Guest
We run into a strange problem...
Here's the flow:
* we need to perform a certain action at a certain hour;
* an object of the type System.Timers.Timer is created, with its Interval
set in the following way:
TimeSpan intervalToStart = startTime - dtNow;
interval = Math.Ceiling(intervalToStart.TotalMilliseconds);
In the logs we see the value being calculated correctly.
So far, all is fine... until ~1.5 sec BEFORE the time the timer should fire.
It fires just ~1.5 sec before the estimated time (notice, some tens of
milliseconds could be explainable, but more than a second?!)
Is it a known flaw in this timers mechanism? Any suggestions?
Please advice...
Here's the flow:
* we need to perform a certain action at a certain hour;
* an object of the type System.Timers.Timer is created, with its Interval
set in the following way:
TimeSpan intervalToStart = startTime - dtNow;
interval = Math.Ceiling(intervalToStart.TotalMilliseconds);
In the logs we see the value being calculated correctly.
So far, all is fine... until ~1.5 sec BEFORE the time the timer should fire.
It fires just ~1.5 sec before the estimated time (notice, some tens of
milliseconds could be explainable, but more than a second?!)
Is it a known flaw in this timers mechanism? Any suggestions?
Please advice...