Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
TIME z/OS TSO/E REXX Reference SA32-0972-00 |
|
>>-TIME(--+--------+--)---------------------------------------->< '-option-' returns the local time in the 24-hour clock format: hh:mm:ss (hours, minutes, and seconds) by default, for example, 04:41:37. You
can use the following options to obtain
alternative formats, or to gain access to the elapsed-time clock.
(Only the capitalized and highlighted letter is needed; all characters
following it are ignored.)
Here are some examples, assuming that the time
is 4:54 p.m.:
The elapsed-time clock: You can use the TIME function to measure real (elapsed) time intervals. On the first call in a program to TIME('E') or TIME('R'), the elapsed-time clock is started, and either call returns 0. From then on, calls to TIME('E') and to TIME('R') return the elapsed time since that first call or since the last call to TIME('R'). The
clock is saved across internal routine calls, which is to say that
an internal routine inherits the time clock its caller started. Any
timing the caller is doing is not affected, even if an internal routine
resets the clock. An example of the elapsed-time clock:
Restriction: See the note under DATE about consistency of times within a single clause. The elapsed-time clock is synchronized to the other calls to TIME and DATE, so multiple calls to the elapsed-time clock in a single clause always return the same result. For the same reason, the interval between two usual TIME/DATE results may be calculated exactly using the elapsed-time clock. Note: Starting with z/OS® V2R1, the REXX elapsed timer
can tolerate a change of the local time while the elapsed timer is
running.
For example, if the local time is adjusted ahead (as with a change from Standard Time to Daylight Savings Time), or backwards (as with a fall back from Daylight Savings Time to Standard Time) while a REXX program is running with an active elapsed timer, the REXX program will see no disruption to the elapsed timer and will continue to run normally, because internally the elapsed timer start time is adjusted, relative to the new local time, to produce a resultant elapsed local time that is within approximately +/- 2 seconds of the actual elapsed UTC timer. If the local time is not changed across an elapsed timer interval, the elapsed timer remains precise down to the nearest microsecond. Implementation maximum: If the number of seconds in the elapsed time exceeds nine digits (equivalent to over 31.6 years), an error results. |
Copyright IBM Corporation 1990, 2014
|