Since the timer interval is not accurate, your update may be poorly synchronized and will drift relative to the actual seconds transition. On some events, you will lag either before the transition and skip updates in your time display
Instead of polling at a high frequency to start updating when seconds change, this method can give you some respect.
If you like the knobs, you can set your time update to be safe 100 ms after the actual second jump by adjusting the 1000 ms timer using the Millisecond property of the time stamp you want to display.
In the timer event code, do something like this:
//Read time DateTime time = DateTime.Now; //Get current ms offset from prefered readout position int diffms = time.Millisecond-100; //Set a new timer interval with half the error applied timer.Interval = 1000 - diffms/2; //Update your time output here..
Then the timer interval should then approach the selected point 100 ms after the transition seconds. When during the transition + 100 ms the error will switch +/- keeping the reading position in time.
tofo
source share