summaryrefslogtreecommitdiffstats
path: root/doc/GetTime.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/GetTime.3')
-rw-r--r--doc/GetTime.344
1 files changed, 26 insertions, 18 deletions
diff --git a/doc/GetTime.3 b/doc/GetTime.3
index d932e47..c3f7134 100644
--- a/doc/GetTime.3
+++ b/doc/GetTime.3
@@ -21,27 +21,21 @@ Tcl_GetTime, Tcl_SetTimeProc, Tcl_QueryTimeProc \- get date and time
.sp
\fBTcl_QueryTimeProc\fR(\fIgetProcPtr, scaleProcPtr, clientDataPtr\fR)
.SH ARGUMENTS
-.AS "Tcl_Time *" timePtr out
-.AP "Tcl_Time *" timePtr out
+.AS Tcl_GetTimeProc *getProc in
+.AP Tcl_Time *timePtr out
Points to memory in which to store the date and time information.
-.AS "Tcl_GetTimeProc *" getProc in
-.AP "Tcl_GetTimeProc *" getProc in
+.AP Tcl_GetTimeProc getProc in
Pointer to handler function replacing \fBTcl_GetTime\fR's access to the OS.
-.AS "Tcl_ScaleTimeProc *" scaleProc in
-.AP "Tcl_ScaleTimeProc *" scaleProc in
+.AP Tcl_ScaleTimeProc scaleProc in
Pointer to handler function for the conversion of time delays in the
virtual domain to real-time.
-.AS "ClientData *" clientData in
-.AP "ClientData *" clientData in
+.AP ClientData clientData in
Value passed through to the two handler functions.
-.AS "Tcl_GetTimeProc **" getProcPtr inout
-.AP "Tcl_GetTimeProc **" getProcPtr inout
+.AP Tcl_GetTimeProc *getProcPtr out
Pointer to place the currently registered get handler function into.
-.AS "Tcl_ScaleTimeProc **" scaleProcPtr inout
-.AP "Tcl_ScaleTimeProc **" scaleProcPtr inout
+.AP Tcl_ScaleTimeProc *scaleProcPtr out
Pointer to place the currently registered scale handler function into.
-.AS "ClientData **" clientDataPtr inout
-.AP "ClientData **" clientDataPtr inout
+.AP ClientData *clientDataPtr out
Pointer to place the currently registered pass-through value into.
.BE
.SH DESCRIPTION
@@ -53,7 +47,7 @@ structure has the following definition:
typedef struct Tcl_Time {
long sec;
long usec;
-} Tcl_Time;
+} \fBTcl_Time\fR;
.CE
.PP
On return, the \fIsec\fR member of the structure is filled in with the
@@ -70,20 +64,34 @@ computer system. On multiprocessor variants of Windows, this number
may be limited to the 10- or 20-ms granularity of the system clock.
(On single-processor Windows systems, the \fIusec\fR field is derived
from a performance counter and is highly precise.)
+.SS "VIRTUALIZED TIME"
.PP
-The \fBTcl_SetTime\fR function registers two related handler functions
+The \fBTcl_SetTimeProc\fR function registers two related handler functions
with the core. The first handler function is a replacement for
\fBTcl_GetTime\fR, or rather the OS access made by
\fBTcl_GetTime\fR. The other handler function is used by the Tcl
notifier to convert wait/block times from the virtual domain into real
time.
.PP
-The \fBTcl_QueryTime\fR function returns the currently registered
+The \fBTcl_QueryTimeProc\fR function returns the currently registered
handler functions. If no external handlers were set then this will
return the standard handlers accessing and processing the native time
of the OS. The arguments to the function are allowed to be NULL; and
any argument which is NULL is ignored and not set.
.PP
+The signatures of the handler functions are as follows:
+.CS
+typedef void \fBTcl_GetTimeProc\fR(
+ Tcl_Time *\fItimebuf\fR,
+ ClientData \fIclientData\fR);
+typedef void \fBTcl_ScaleTimeProc\fR(
+ Tcl_Time *\fItimebuf\fR,
+ ClientData \fIclientData\fR);
+.CE
+The \fItimebuf\fR fields contain the time to manipulate, and the
+\fIclientData\fR fields contain a pointer supplied at the time the
+handler functions were registered.
+.PP
Any handler pair specified has to return data which is consistent
between them. In other words, setting one handler of the pair to
something assuming a 10-times slowdown, and the other handler of the
@@ -97,6 +105,6 @@ time one way or other. Note that the insertion of the hooks will not
change the behaviour of the Tcl core with regard to this situation,
i.e. the existing behaviour is retained.
.SH "SEE ALSO"
-clock
+clock(n)
.SH KEYWORDS
date, time