Hello Everyone,
I have written a VB.NET windows desktop program. In that program when main form is loaded it fetches date and time from server. That date and time is saved in a datetime variable.
Then I have created a timer which adds 1 second to that date time variable so that its remains updated.
However I have seen that after a few hours of using the program the time starts lagging and is behind the actual time by couple of minutes. Is this because if program carries some tasks which locks it for a few seconds sometimes (then does timer stop working) ? Some tasks are carried on UI thread and some in background thread.
Please let me know how to solve it?
Thank you,
Regards
GR
I have written a VB.NET windows desktop program. In that program when main form is loaded it fetches date and time from server. That date and time is saved in a datetime variable.
Then I have created a timer which adds 1 second to that date time variable so that its remains updated.
However I have seen that after a few hours of using the program the time starts lagging and is behind the actual time by couple of minutes. Is this because if program carries some tasks which locks it for a few seconds sometimes (then does timer stop working) ? Some tasks are carried on UI thread and some in background thread.
Please let me know how to solve it?
Thank you,
Regards
GR