waving android

I am currently a software engineer at Google, where as a member of the Android platform team I build frameworks and user interfaces.

The blog here at is mostly historical; you can find more recent posts on .

Clock weirdness on OS X

May 25th, 2006

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?

Add a comment

html help (show)

newer: older: