tag = timeout_add(interval, function, ...)
The first argument is the number of milliseconds
between calls to your function. The second argument is the callback you
wish to have called. Any arguments after the second are passed to the function
as data. The return value is an integer "tag"
which may be used to stop the timeout by calling:
You may also stop the timeout function by returning zero or FALSE from your callback. Obviously this means if you want your callback to continue to be called, it should return a non-zero value, i.e., TRUE.
Your callback should look something like
The number of arguments to the callback should match the number of data arguments specified in timeout_add().