⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crttimerhdlr.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1990 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) CrtTimerHdlr.3 1.4 96/09/17 10:54:58'\" .so man.macros.TH Tcl_CreateTimerHandler 3 7.5 Tcl "Tcl Library Procedures".BS.SH NAMETcl_CreateTimerHandler, Tcl_DeleteTimerHandler \- call a procedure at agiven time.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spTcl_TimerToken\fBTcl_CreateTimerHandler\fR(\fImilliseconds, proc, clientData\fR).sp\fBTcl_DeleteTimerHandler\fR(\fItoken\fR).SH ARGUMENTS.AS Tcl_TimerToken milliseconds.AP int milliseconds  inHow many milliseconds to wait before invoking \fIproc\fR..AP Tcl_TimerProc *proc inProcedure to invoke after \fImilliseconds\fR have elapsed..AP ClientData clientData inArbitrary one-word value to pass to \fIproc\fR..AP Tcl_TimerToken token inToken for previously-created timer handler (the return valuefrom some previous call to \fBTcl_CreateTimerHandler\fR)..BE.SH DESCRIPTION.PP\fBTcl_CreateTimerHandler\fR arranges for \fIproc\fR to beinvoked at a time \fImilliseconds\fR milliseconds in thefuture.The callback to \fIproc\fR will be made by \fBTcl_DoOneEvent\fR,so \fBTcl_CreateTimerHandler\fR is only useful in programs thatdispatch events through \fBTcl_DoOneEvent\fR or through Tcl commandssuch as \fBvwait\fR.The call to \fIproc\fR may not be made at the exact time given by\fImilliseconds\fR:  it will be made at the next opportunityafter that time.  For example, if \fBTcl_DoOneEvent\fR isn'tcalled until long after the time has elapsed, or if thereare other pending events to process before the call to\fIproc\fR, then the call to \fIproc\fR will be delayed..PP\fIProc\fR should have arguments and return value that matchthe type \fBTcl_TimerProc\fR:.CStypedef void Tcl_TimerProc(ClientData \fIclientData\fR);.CEThe \fIclientData\fR parameter to \fIproc\fR is acopy of the \fIclientData\fR argument given to\fBTcl_CreateTimerHandler\fR when the callbackwas created.  Typically, \fIclientData\fR points to a datastructure containing application-specific information aboutwhat to do in \fIproc\fR..PP\fBTcl_DeleteTimerHandler\fR may be called to delete apreviously-created timer handler.  It deletes the handlerindicated by \fItoken\fR so that no call to \fIproc\fRwill be made;  if that handler no longer exists(e.g. because the time period has already elapsed and \fIproc\fRhas been invoked then \fBTcl_DeleteTimerHandler\fR does nothing.The tokens returned by \fBTcl_CreateTimerHandler\fR never havea value of NULL, so if NULL is passed to \fBTcl_DeleteTimerHandler\fRthen the procedure does nothing..SH KEYWORDScallback, clock, handler, timer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -