Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Time Drift when using Win32::Daemon::Simple

by rah (Monk)
on Apr 17, 2003 at 17:49 UTC ( [id://251274]=note: print w/replies, xml ) Need Help??


in reply to Re: Time Drift when using Win32::Daemon::Simple
in thread Time Drift when using Win32::Daemon::Simple

Not sure I follow (been a long couple of days). Do you mean replace the daemon's interval call back with this timing loop? I ran a simple test and it does seem to stay accurate to the second.

The other approach I had considered was to test for how much the timer had drifted at safe periods, then pause and resume the service to get back on synch. It doesn't elimate the problem, but allows me to specify where it skips ahead to the next minute. This would eliminate the risk of my missing a significant time period.

  • Comment on Re: Re: Time Drift when using Win32::Daemon::Simple

Replies are listed 'Best First'.
Re: Re: Re: Time Drift when using Win32::Daemon::Simple
by Jenda (Abbot) on Apr 17, 2003 at 19:13 UTC

    1. Yes. Just replace the

    ServiceLoop(\&callback);
    with the loop.

    2. I don't think I follow, you mean that your callback would wait 59 seconds in case the time drifted to put it back in sync? Well you can do that. Apart from the fact that you will not be able to stop the service (via the Service Manager) during those 59 seconds you are safe.

    Jenda
    All those who understood the topic I just elucidated, please verticaly extend your upper limbs.
       -- Ted Goff

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found