awaytimer OnSleep event
Previous  Top  Next
Applies to
umAwayTimer component.  

Declaration
property OnSleep: TNotifyEvent;  

Description
The OnSleep event occurs after some period of user inactivity, specified in SleepInterval property.  
 
iiinfo For example, the OnSleep event will occur in 5 minutes of user inactivity (if user did not moved mouse and did not pressed keyboard buttons), if SleepInterval property is 300000 (5 minutes = 300 seconds = 300000 milliseconds).  
 
tip You can use OnSleep event to execute some specific actions when user away from PC. For example, automatically save file, re-index the database etc. If you are writing Internet communication tool, you can switch the status of presence to "inactive" (Sleep/Away mode, like it does most Inernet Conferencing and Instant Messenger tools like ICQ, AOL, MSN or WinJabber), to inform user on the other side that user is temporary away. If you wish to return the presence status to previous state when user become active — use OnAwake event handler.  

See also
SleepInterval property and OnAwake event.