Menu

#12 betterSleep could take a really long time under linux

0.6
open
nobody
None
1
2007-06-28
2007-06-28
j_house
No

At midnight and at changes in the hour (such as daylight savings time), the call to time of day will return values that are different than expected.

If the goal end time is after the end of the day, it'll keep sleeping and never reach a time of day past the end of the day. For cases with daylight savings, it could end up sleeping for an hour longer than expected or suddenly finish sleeping on the hour.

Discussion

  • j_house

    j_house - 2007-06-28

    Logged In: YES
    user_id=1353569
    Originator: YES

    gettimeofday is really a misnomer. It gives the time since "start of epoch". That means that it'll only overflow in really rare circumstances. The timezone field is unused and daylight savings has no effect on its output. I've reduced the importance of this bug based on this new information.

     
  • j_house

    j_house - 2007-06-28
    • priority: 5 --> 1
     

Log in to post a comment.

MongoDB Logo MongoDB