$time - The current system time
$time "string"
$time is a constantly changing variable which is set to the current system time. The format of $time is "YYYYCCCMMDDWhhmmssSSS", where:-
YYYY
CCC
MM
DD
W
hh
mm
ss
SSS
$time can be set to an integer value which is a time offset in seconds, for example if the following was executed;-
set-variable $time "3600" ml-write &cat "$time is " $time set-variable $time "0"
The written time would one hour ahead of the system time.
The following macro times the time taken to execute a user command:-
define-macro time !force set-variable #l2 @1 !if ¬ $status set-variable #l2 @ml00 "Time command" !endif set-variable #l0 $time !force execute-line #l2 set-variable #l1 $time set-variable #l2 &add &mid #l0 16 2 &mul 60 &add &mid #l0 14 2 &mul 60 &mid #l0 12 2 set-variable #l3 &add &mid #l1 16 2 &mul 60 &add &mid #l1 14 2 &mul 60 &mid #l1 12 2 !if &les &set #l4 &sub &rig #l1 18 &rig #l0 18 0 set-variable #l2 &add #l2 1 set-variable #l4 &add 1000 #l4 !endif ml-write &spr "Command took %d sec %d msec" &sub #l3 #l2 #l4 !emacro
time(3) is a macro defined in misc.emf.
organizer(3) uses $time to work out the current month.
(c) Copyright JASSPA 1999
Last Modified: 1999/02/01
Generated On: 1999/12/01