add_idle_watch


Description:

public uint add_idle_watch (uint64 interval_msec, owned IdleMonitorWatchFunc? callback)

Parameters:

this

A IdleMonitor

interval_msec

The idletime interval, in milliseconds. It must be a strictly positive value (> 0).

callback

The callback to call when the user has accumulated interval_msec milliseconds of idle time.

notify

A DestroyNotify

user_data

The user data to pass to the callback

Returns:

a watch id

Adds a watch for a specific idle time. The callback will be called when the user has accumulated interval_msec milliseconds of idle time. This function will return an ID that can either be passed to remove_watch, or can be used to tell idle time watches apart if you have more than one.

Also note that this function will only care about positive transitions (user's idle time exceeding a certain time). If you want to know about when the user has become active, use add_user_active_watch.