Clock weirdness on OS X
I’m trying to sleep until (very nearly) exactly every minute, on the minute. So I’m perplexed when, expecting to wake up at 10:54, I see the following: (from the Console log output)
2006-05-25 10:53:60.000 CuckooChimeAgent[1654] Wakeup @ 53:59
The code:
NSCalendarDate * now = [NSCalendarDate calendarDate];
int min = [now minuteOfHour];
int sec = [now secondOfMinute];
NSLog(@"Wakeup @ %02d:%02d", min, sec);
So I woke up at 10:54, but the calendar date still shows 10:53 and, apparently, sixty seconds. What the hell kind of time is 10:53:60?