Tcl8.6/Tk8.6 Documentation > Tcl C API, version 8.6.8 > CrtTimerHdlr
Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API
- Tcl_CreateTimerHandler, Tcl_DeleteTimerHandler — call a procedure at a given time
- #include <tcl.h>
- Tcl_CreateTimerHandler(milliseconds, proc, clientData)
- SEE ALSO
Tcl_CreateTimerHandler(milliseconds, proc, clientData)
- int milliseconds (in)
- How many milliseconds to wait before invoking proc.
- Tcl_TimerProc *proc (in)
- Procedure to invoke after milliseconds have elapsed.
- ClientData clientData (in)
- Arbitrary one-word value to pass to proc.
- Tcl_TimerToken token (in)
- Token for previously created timer handler (the return value from some previous call to Tcl_CreateTimerHandler).
Proc should have arguments and return value that match the type Tcl_TimerProc:
typedef void Tcl_TimerProc( ClientData clientData);
The clientData parameter to proc is a copy of the clientData argument given to Tcl_CreateTimerHandler when the callback was created. Typically, clientData points to a data structure containing application-specific information about what to do in proc.
Tcl_DeleteTimerHandler may be called to delete a previously created timer handler. It deletes the handler indicated by token so that no call to proc will be made; if that handler no longer exists (e.g. because the time period has already elapsed and proc has been invoked then Tcl_DeleteTimerHandler does nothing. The tokens returned by Tcl_CreateTimerHandler never have a value of NULL, so if NULL is passed to Tcl_DeleteTimerHandler then the procedure does nothing.after, Tcl_CreateFileHandler, Tcl_DoWhenIdle callback, clock, handler, timer
Copyright © 1994-1996 Sun Microsystems, Inc.