I have been facing a very unique problem. I am using a System.Timers.Timer which triggers a method every minute. Gradually, I came to know the time interval is not constant.
For testing and ensuring the issue, i just run a timer which elapsed a function every minute. And the output was shocking, the timer interval seconds are not constant. They are changing thus so creating an issue.
12/13/2016 3:39:26 PM
12/13/2016 3:40:25 PM
12/13/2016 3:41:25 PM
12/13/2016 3:42:25 PM
12/13/2016 3:43:25 PM
12/13/2016 3:44:26 PM
12/13/2016 3:45:26 PM
12/13/2016 3:46:26 PM
12/13/2016 3:47:26 PM
12/13/2016 3:48:26 PM
12/13/2016 3:49:26 PM
12/13/2016 3:50:26 PM
12/13/2016 3:51:26 PM
As one can notice the interval is gradually increasing. The problem occurs when days expend. Thus so issue is creating like I have to process within the minute and the date is changed.
The code is simple
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 60000;
timer.Elapsed += timer_Elapsed;
timer.Start();
59.?and60.?with no apparent trend. Windows is not a real time OS, so the timer intervals will never be exact. - InBetween