I know that there is some way to get the system idle time with the IOKit framework on OS X, but I want to know if there's notifications available.
I can create a timer to check if the idle time is more than x, and that's fine. It doesn't matter if I detect the idle mode a few seconds later.
The problem is to detect when the Mac is not idle anymore. I want my app to show a notification as soon as possible, not a few seconds later.
Is there a way to have a notification for that? (iChat seems to have one)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…