up previous next
ElapsedTime --
Counts elapsed time
|
Use the function
CpuTime
to measure how long your program took
to compute its result.
This function returns a
RAT whose value is the
elapsed time in
seconds since the start of the program. We recommend using
DecimalStr
to print out the value in a way which is convenient to comprehend.
/**/ TimeBeforeSleep := ElapsedTime();
/**/ SleepFor(5);
/**/ TimeAfterSleep := ElapsedTime();
/**/ DecimalStr(TimeAfterSleep - TimeBeforeSleep);
5.001
|