/Doc/ref/

alue='ajuba_ajuba2_2_1_base_synthetic'>ajuba_ajuba2_2_1_base_synthetic Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/doc/clock.n
blob: 80553a9d93794742fd60dcc983995aabd0251c88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
'\"
'\" Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
'\" Copyright (c) 1998-1999 Scriptics Corporation
'\" Copyright (c) 2002 ActiveState Corporation
'\"
'\" This documentation is derived from the time and date facilities of
'\" TclX, by Mark Diekhans and Karl Lehenbauer.
'\" 
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id: clock.n,v 1.11.2.6 2004/12/13 15:52:21 kennykb Exp $
'\" 
.so man.macros
.TH clock n 8.4 Tcl "Tcl Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
clock \- Obtain and manipulate time
.SH SYNOPSIS
\fBclock \fIoption\fR ?\fIarg arg ...\fR?
.BE

.SH DESCRIPTION
.PP
This command performs one of several operations that may obtain
or manipulate strings or values that represent some notion of
time.  The \fIoption\fR argument determines what action is carried
out by the command.  The legal \fIoptions\fR (which may be
abbreviated) are:
.VS 8.3
.TP
\fBclock clicks\fR ?\fB\-milliseconds\fR?
Return a high-resolution time value as a system-dependent integer
value.  The unit of the value is system-dependent but should be the
highest resolution clock available on the system such as a CPU cycle
counter. If \fB\-milliseconds\fR is specified, then the value is
guaranteed to be of millisecond granularity.
This value should only be used for the relative measurement
of elapsed time.
.VE 8.3
.TP
\fBclock format \fIclockValue\fR ?\fB\-format \fIstring\fR? ?\fB\-gmt \fIboolean\fR?
Converts an integer time value, typically returned by
\fBclock seconds\fR, \fBclock scan\fR, or the \fBatime\fR or \fBmtime\fR
options of the \fBfile\fR command, to human-readable
form.  If the \fB\-format\fR argument is present the next argument is a
string that describes how the date and time are to be formatted.
Field descriptors consist of a \fB%\fR followed by a field
descriptor character.  All other characters are copied into the result.
Valid field descriptors are:
.RS
.IP \fB%%\fR
Insert a %.
.IP \fB%a\fR
Abbreviated weekday name (Mon, Tue, etc.).
.IP \fB%A\fR
Full weekday name (Monday, Tuesday, etc.).
.IP \fB%b\fR
Abbreviated month name (Jan, Feb, etc.).
.IP \fB%B\fR
Full month name.
.VS 8.4
.IP \fB%c\fR
Locale specific date and time.  The format for date and time
in the default "C" locale on Unix/Mac is "%a %b %d %H:%M:%S %Y".
On Windows, this value is the locale specific long date and time, as
specified in the Regional Options control panel settings.
.IP \fB%C\fR
First two digits of the four-digit year (19 or 20).
.VE 8.4
.IP \fB%d\fR
Day of month (01 - 31).
.VS 8.4
'\" Since the inclusion of compat/strftime.c, %D, %e, %h should work on all
'\" platforms.
.IP \fB%D\fR
Date as %m/%d/%y.
.IP \fB%e\fR
Day of month (1 - 31), no leading zeros.
.IP \fB%g\fR
The ISO8601 year number corresponding to the ISO8601 week (%V), expressed
as a two-digit year-of-the-century, with leading zero if necessary.
.IP \fB%G\fR
The ISO8601 year number corresponding to the ISO8601 week (%V), expressed
as a four-digit number.
.IP \fB%h\fR
Abbreviated month name.
.VE 8.4
.IP \fB%H\fR
Hour in 24-hour format (00 - 23).
.VS 8.4
.IP \fB%I\fR
Hour in 12-hour format (01 - 12).
.VE 8.4
.IP \fB%j\fR
Day of year (001 - 366).
.VS 8.4
.IP \fB%k\fR
Hour in 24-hour format, without leading zeros (0 - 23).
.IP \fB%l\fR
Hour in 12-hour format, without leading zeros (1 - 12).
.VE 8.4
.IP \fB%m\fR
Month number (01 - 12).
.IP \fB%M\fR
Minute (00 - 59).
.VS 8.4
.IP \fB%n\fR
Insert a newline.
.VE 8.4