In Cocoa, is there a notification i can register for, that informs me, when a new day begins - at 00h:00min:01s in the morning?
If it is for iPhone development, you can also listen for a UIApplicationSignificantTimeChangeNotification. It gets posted on more occasions than the arrival of midnight, but when you receive one, you can simply check if you are on or near midnight.
For Mac OS X, you would have to do what Tom Dalling suggests but you should also keep track of changes to the system clock yourself (in order to update your timer) as well as changes to the current time zone.
1.4m articles
1.4m replys
5 comments
57.0k users