Next: Operating System Commands
Up: Communicating with the Operating
Previous: Communicating with the Operating
The command date returns the current date and time as a string.
If you prefer to know the number of seconds since 00:00:00 GMT,
January 1, 1970 in seconds, then issue the rtime command (running
time) with no arguments.
The rtime function can also except an expression as a parameter.
In this form, rtime returns the time in seconds needed
to evaluate this expression.
for i from 1 to 100001 by 500 do
As an aside, note that the running time does not grow linearly with the size of
the factorial we are computing. This is because the built-in factorial function approximates the true value for large numbers
using a variant of the gamma function
(see § in Part -The Reference
Guide and ).
Performance explores this and related functions further.