Rexxref for time("elapsed")
and time("reset")
says
returns sssssssss.uuuuuu .. has always four trailing zeros in the decimal portion.
Actually, the ouput has three trailing zeros on Windows, no trailing zeros on Linux, and has no decimal digits at all for a zero result.
I suggest to just remove the "has always four trailing zeros in the decimal portion" from the docs
Anonymous
I suggest the documentation simply reflect reality. As a guess, the 'trailing zeroes' part
was probably derived from the VM Ref, where the original statement about Elapsed
was copied down to the Reset section (at least in my copy). I'd have to check my Draft
of Object Rexx to see what the wordsmiths wrote for the pc, and it's tucked away upstairs!
According to
https://www.ibm.com/support/knowledgecenter/en/SSB27U_6.3.0/com.ibm.zvm.v630.dmsb1/time.htm
the REXX/VM Reference says "The fractional part always has six digits." for
both TIME("E") and TIME("R").
But I don't think it's true: at least on a REXX370 4.02 01 Dec 1998 the
output for a simple
say time('e')
is 0. No decimal digits at all.Committed change with revision [r11295]
Related
Commit: [r11295]
Time(E) certainly behaves differently than what is documented. This simple THE
macro:
call time 'R'
say result
b=0
do i=1 to 10000
b=i+1
End
say time('E')
exit
yields:
0
0.003000
I'd guess that your simple Say Time('E') is actually 'correct', since the
definition reuires a Reset.
Also, I checked the Object Rexx Beta draft and the current doc was
directly copied from that OS/2 manual which, in turn, reworded it from
the VM Ref of the same timeframe.
I'm in favor of documenting the actual behavior, thus avoiding future
Doc issues.