diff options
author | hobbs <hobbs> | 2001-11-21 02:36:18 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-11-21 02:36:18 (GMT) |
commit | cff9c3309b2e3c096c301a94bff0d9804be13520 (patch) | |
tree | d6c9734d5b8944f4d96bc77057fc560b661f57c4 /doc/GetTime.3 | |
parent | f59ffab94e11d0dc9efd7189ec5c64e904cdfedd (diff) | |
download | tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.zip tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.tar.gz tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.tar.bz2 |
added TIP#73 patch #483500 from Kevin Kenny.
This deprecates TclpGetTime in favor of new Tcl_GetTime.
Diffstat (limited to 'doc/GetTime.3')
-rw-r--r-- | doc/GetTime.3 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/GetTime.3 b/doc/GetTime.3 new file mode 100644 index 0000000..f72175f --- /dev/null +++ b/doc/GetTime.3 @@ -0,0 +1,53 @@ +'\" +'\" Copyright (c) 2001 by Kevin B. Kenny. +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id$ +'\" +.so man.macros +.TH Tcl_GetTime 3 8.4 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_GetTime \- get date and time +.SH SYNOPSIS +.nf +\fB#include <tcl.h>\fR +.sp +\fBTcl_GetTime\fR(\fI timePtr \fR) +.SH ARGUMENTS +.AS "Tcl_Time *" timePtr +.AP "Tcl_Time *" timePtr out +Points to memory in which to store the date and time information. +.BE +.SH DESCRIPTION +.PP +The \fBTcl_GetTime\fR function retrieves the current time as a +\fITcl_Time\fR structure in memory the caller provides. This +structure has the following definition: +.CS +typedef struct Tcl_Time { + long sec; + long usec; +} Tcl_Time; +.CE +.PP +On return, the \fIsec\fR member of the structure is filled in with the +number of seconds that have elapsed since the \fIepoch:\fR the epoch +is the point in time of 00:00 UTC, 1 January 1970. This number does +\fInot\fR count leap seconds \- an interval of one day advances it by +86400 seconds regardless of whether a leap second has been inserted. +.PP +The \fIusec\fR member of the structure is filled in with the number of +microseconds that have elapsed since the start of the second +designated by \fIsec\fR. The Tcl library makes every effort to keep +this number as precise as possible, subject to the limitations of the +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.) +.SH "SEE ALSO" +clock +.SH KEYWORDS +date, time |