*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Tk/timerhndlr (3)              
Title
Content
Arch
Section
 

Contents


Tk_CreateTimerHandler(3Tk)			    Tk_CreateTimerHandler(3Tk)


NAME    [Toc]    [Back]

     Tk_CreateTimerHandler, Tk_DeleteTimerHandler - call a procedure at	a
     given time

SYNOPSIS    [Toc]    [Back]

     #include <tk.h>

     Tk_TimerToken
     Tk_CreateTimerHandler(milliseconds, proc, clientData)

     Tk_DeleteTimerHandler(token)

ARGUMENTS    [Toc]    [Back]

     int	     milliseconds   (in)      How many milliseconds to wait
					      before invoking proc.

     Tk_TimerProc    *proc	    (in)      Procedure	to invoke after
					      milliseconds have	elapsed.

     ClientData	     clientData	    (in)      Arbitrary	one-word value to pass
					      to proc.

     Tk_TimerToken   token	    (in)      Token for	previously-created
					      timer handler (the return	value
					      from some	previous call to
					      Tk_CreateTimerHandler).

DESCRIPTION    [Toc]    [Back]

     Tk_CreateTimerHandler arranges for	proc to	be invoked at a	time
     milliseconds milliseconds in the future.  The callback to proc will be
     made by Tk_DoOneEvent, so Tk_CreateTimerHandler is	only useful in
     programs that dispatch events through Tk_DoOneEvent or through other Tk
     procedures	that call Tk_DoOneEvent, such as Tk_MainLoop.  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
     Tk_DoOneEvent 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
     Tk_TimerProc:
	  typedef void Tk_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 applicationspecific
 information about	what to	do in proc.

     Tk_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



									Page 1






Tk_CreateTimerHandler(3Tk)			    Tk_CreateTimerHandler(3Tk)



     Tk_DeleteTimerHandler does	nothing.

KEYWORDS    [Toc]    [Back]

     callback, clock, handler, timer


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
rpc Tru64 Remote procedure call file
rpc IRIX Remote Procedure Call (RPC) library routines
rpcgen NetBSD Remote Procedure Call (RPC) protocol compiler
rpcinfo Tru64 report remote procedure call (RPC) information
svcerr_auth NetBSD library routines for server side remote procedure call errors
svcerr_noproc FreeBSD library routines for server side remote procedure call errors
svcerr_decode NetBSD library routines for server side remote procedure call errors
svcerr_noproc NetBSD library routines for server side remote procedure call errors
authsys_create_default NetBSD library routines for client side remote procedure call authentication
svcerr_decode FreeBSD library routines for server side remote procedure call errors
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service