summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2017-03-15 02:40:56 (GMT)
committerKevin B Kenny <kennykb@acm.org>2017-03-15 02:40:56 (GMT)
commitbbe4542d364121720a36d12051e45c8c42cf25d9 (patch)
treecc56a92667132923a5a6db8320ad3e2df4a0fd60 /generic/tclClock.c
parentbbf9191cdf2558bb4e7571a1cf57886d79826c7e (diff)
parent89b08916f5e330151206c6ab42468f957bfd41af (diff)
downloadtcl-bbe4542d364121720a36d12051e45c8c42cf25d9.zip
tcl-bbe4542d364121720a36d12051e45c8c42cf25d9.tar.gz
tcl-bbe4542d364121720a36d12051e45c8c42cf25d9.tar.bz2
Compile [clock clicks], [clock microseconds], [clock milliseconds] and [clock seconds].
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index b8f9ac5..ac4a4d6 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -208,11 +208,7 @@ struct ClockCommand {
};
static const struct ClockCommand clockCommands[] = {
- { "clicks", ClockClicksObjCmd },
{ "getenv", ClockGetenvObjCmd },
- { "microseconds", ClockMicrosecondsObjCmd },
- { "milliseconds", ClockMillisecondsObjCmd },
- { "seconds", ClockSecondsObjCmd },
{ "Oldscan", TclClockOldscanObjCmd },
{ "ConvertLocalToUTC", ClockConvertlocaltoutcObjCmd },
{ "GetDateFields", ClockGetdatefieldsObjCmd },
@@ -256,14 +252,14 @@ TclClockInit(
/* Structure of the 'clock' ensemble */
static const EnsembleImplMap clockImplMap[] = {
- {"add", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
- {"clicks", NULL, TclCompileBasicMin0ArgCmd, NULL, NULL, 0},
- {"format", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
- {"microseconds", NULL, TclCompileBasicMin0ArgCmd, NULL, NULL, 0},
- {"milliseconds", NULL, TclCompileBasicMin0ArgCmd, NULL, NULL, 0},
- {"scan", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
- {"seconds", NULL, TclCompileBasicMin0ArgCmd, NULL, NULL, 0},
- {NULL, NULL, NULL, NULL, NULL, 0}
+ {"add", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
+ {"clicks", ClockClicksObjCmd, TclCompileClockClicksCmd, NULL, NULL, 0},
+ {"format", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
+ {"microseconds", ClockMicrosecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(1), 0},
+ {"milliseconds", ClockMillisecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(2), 0},
+ {"scan", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL , 0},
+ {"seconds", ClockSecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(3), 0},
+ {NULL, NULL, NULL, NULL, NULL, 0}
};
/*