Each object that implements the WindowTimers interface has a list of active timers. Each entry in this lists is identified by a number, which must be unique within the list for the lifetime of the object that implements the WindowTimers interface.
static int timeoutId()
{
static int lastUsedTimeoutId = 0;
++lastUsedTimeoutId;
// Avoid wraparound going negative on us.
if (lastUsedTimeoutId <= 0)
lastUsedTimeoutId = 1;
return lastUsedTimeoutId;
}