The problem of C # timer invalidation caused by system time automatic synchronization service

Source: Internet
Author: User

There is a Windows service, every minute to detect whether there are currently need to perform tasks, there is a task set to 01:00 execution, but today did not perform, looked at the program's log and system log, can be judged to be the system time automatic synchronization service causes C # timer invalidation.


Log in Windows Event Viewer: 2016-02-14 17:00:17 => 2016-02-14 17:00:54

Beijing time Plus 8 hours, 17+8-24=1, just a little
The timer in the program, the original is 1 minutes, according to the system time corresponding adjustment, also want to increase 38 seconds, so in that time length of 1 minutes 38 seconds (actual time or 1 minutes, but to the end of the "moment" moved back 38 seconds)

The failure of this is very covert and is hereby remembered.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.