Manual Pages for UNIX Darwin command on man CrtTimerHdlr
MyWebUniversity

Manual Pages for UNIX Darwin command on man CrtTimerHdlr

TclCreateTimerHandler(3) Tcl Library Procedures TclCreateTimerHandler(3)

NAME

TclCreateTimerHandler, TclDeleteTimerHandler - call a procedure at a

given time

SYNOPSIS

##iinncclluuddee <>

TclTimerToken TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr(milliseconds, proc, clientData) TTccllDDeelleetteeTTiimmeerrHHaannddlleerr(token) AARRGGUUMMEENNTTSS int milliseconds (in) How many milliseconds to wait before invoking proc. TclTimerProc *proc (in) Procedure to invoke after milliseconds have elapsed.

ClientData clientData (in) Arbitrary one-word value to

pass to proc.

TclTimerToken token (in) Token for previously-created

timer handler (the return value from some previous call to TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr).

DESCRIPTION

TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr arranges for proc to be invoked at a time mil-

liseconds milliseconds in the future. The callback to proc will be made by TTccllDDooOOnneeEEvveenntt, so TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr is only useful in programs that dispatch events through TTccllDDooOOnneeEEvveenntt or through Tcl commands such as vvwwaaiitt. The call to proc may not be made at the exact time given by milliseconds: it will be made at the next opportunity after that time. For example, if TTccllDDooOOnneeEEvveenntt isn't called until long after the time has elapsed, or if there are other pending events to process before the call to proc, then the call to proc will be delayed. Proc should have arguments and return value that match the type TTccllTTiimmeerrPPrroocc: typedef void TclTimerProc(ClientData clientData); The clientData parameter to proc is a copy of the clientData argument

given to TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr when the callback was created. Typi-

cally, clientData points to a data structure containing application-

specific information about what to do in proc.

TTccllDDeelleetteeTTiimmeerrHHaannddlleerr 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 TTccllDDeelleetteeTTiimmeerrHHaannddlleerr does nothing. The tokens returned by TTccllCCrreeaatteeTTiimmeerrHHaannddlleerr never have a value of NULL, so if NULL is passed to TTccllDDeelleetteeTTiimmeerrHHaannddlleerr then the procedure does nothing. KKEEYYWWOORRDDSS callback, clock, handler, timer Tcl 7.5 TclCreateTimerHandler(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™