Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6350699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:51:45+00:00 2026-05-24T21:51:45+00:00

Said now is 6 o’clock, I have a Timer and scheduled a TimerTask at

  • 0

Said now is 6 o’clock, I have a Timer and scheduled a TimerTask at 10 o’clock. After that, System DateTime is adjusted by an other service (ntp for example) to 9 o’clock. I still want my TimerTask will be fired at 10 o’clock but it does not, Timer still wait for next 4 hours and fire my TimerTask. What should I do in this situation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:51:47+00:00Added an answer on May 24, 2026 at 9:51 pm

    Firstly, you’re already in a pretty nasty mess if your clock is out by 4 hours. Typically time adjustments will only be by milliseconds or seconds – or occasionally a minute or two, if the machine hasn’t been online for a very long time. One option would be to check that the time is reasonably accurate by making your own NTP call before setting the timer.

    Another option is to make a reasonably regularly-invoked timer – for example once every minute or five minutes – which checks the time and then optionally takes action. It’s slightly less efficient, but I wouldn’t expect the impact of waking up a single thread to perform a simple check once a minute or so would have a significant effect on performance. You should adjust the regularity of the check based on how accurately you need your timer to fire, and how little performance impact you need it to have.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Until now, I have always said that CakePHP is too bloated and slow. I
I developed a asp.net 2.0 web service (.asmx), now my client said that there
Other posters have previously said in this forum that when your Django app starts
I developed a WCF service, and now reading about the bindings. It s said
I am working on a site now that seems to have an infinite loop
Somebody said that when your PHP code and application use global variables then it
They said this expression is valid in C, and that it means calling a
Simplex algorithm is said to have exponential worst case time complexity. Yet it is
It is said that when a UIView object is created with programmer's code, then
I've heard it said that the Entity Framework is overkill or that it's difficult

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.