RE: Determining actual elapsed (wall-clock) time

Discussion in 'Python' started by Coates, Steve (ACHE), Jul 4, 2005.


  1. > -----Original Message-----
    > From: Roy Smith [mailto:]
    > Sent: 02 July 2005 21:22
    > To:
    > Subject: Re: Determining actual elapsed (wall-clock) time

    <SNIP>

    > If you get the UTC time, daylight savings time doesn't enter
    > the equation.
    > If the system clock is reset, however, you're out of luck. I
    > can't think of any time-related API which doesn't rely on the
    > system clock as a reference. If the system clock is good,
    > you get good time. If the system clock sucks, or changes, you don't.
    >
    > If you care about time, you want your system clock controlled
    > by NTP.
    > There's just no excuse not to.
    >
    > Is there some reason you can't just use the system clock? I
    > suppose if you had to, you could hobble together your own NTP
    > client which keeps network time independent of the system
    > clock. But that would be a lot of work and it's hard to
    > imagine the effort would be justified.
    >
    >


    There is already an NTP client in the ASPN cookbook :-

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211

    ******************************************
    The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
    ******************************************
     
    Coates, Steve (ACHE), Jul 4, 2005
    #1
    1. Advertising

  2. Coates, Steve (ACHE)

    Peter Hansen Guest

    Coates, Steve (ACHE) wrote:
    >
    > There is already an NTP client in the ASPN cookbook :-
    > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211


    Thanks Steve. As it turns out, Windows XP already has support (via NTP
    I presume, though of course since this is Microsoft they try to keep the
    user base ignorant by making no mention of that even in the help page)
    for keeping the clock accurate, right on the last tab (labelled
    "Internet Time") of the Date and Time Properties dialog.

    And on Linux, of course, this is already a trivial matter.

    With what Tim clarified about time.time(), it will be quite sufficient
    when used in conjunction with a threatened slap on the wrist (or a label
    on the side of the monitor) for any user who tries to change the
    clock... (Thanks, Tim! time.time() makes sense finally.)

    -Peter
     
    Peter Hansen, Jul 4, 2005
    #2
    1. Advertising

  3. Coates, Steve (ACHE)

    Roy Smith Guest

    Peter Hansen <> wrote:
    > As it turns out, Windows XP already has support (via NTP
    > I presume, though of course since this is Microsoft they try to keep the
    > user base ignorant by making no mention of that even in the help page)
    > for keeping the clock accurate, right on the last tab (labelled
    > "Internet Time") of the Date and Time Properties dialog.


    Sigh. Unfortunately, it's not just MS. Apple does the same thing. In the
    Date & Time control panel, there's an option to "Set Date & Time
    Automatically". What it's doing is turning on NTP, but it doesn't say that
    (even in the help text).

    In this case, it was pretty easy to guess (and verify with tcpdump), but
    sometimes it's really infuriating when software providers eschew the use of
    technical terms for "easy to understand plain english" to the point of
    making it impossible to figure out what's really going on.
     
    Roy Smith, Jul 4, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Hansen
    Replies:
    13
    Views:
    692
    Peter Hansen
    Jul 7, 2005
  2. Geert Jansen
    Replies:
    1
    Views:
    328
    Dieter Maurer
    Nov 26, 2005
  3. aegis

    wall clock time

    aegis, Dec 15, 2004, in forum: C Programming
    Replies:
    12
    Views:
    655
    infobahn
    Dec 18, 2004
  4. Replies:
    5
    Views:
    1,559
    Ben Bacarisse
    Nov 19, 2006
  5. rutherf
    Replies:
    2
    Views:
    432
    rutherf
    Oct 28, 2006
Loading...

Share This Page