HP Forums

Full Version: Time measurement of a function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I need to know how long it takes to execute a function.
Please can you help me with this.

Cheers Jan
Problem solved, using TICKS gives the right result
TEVAL(function()) will give you your time in sec as well.
(10-08-2015 03:45 PM)Tim Wessman Wrote: [ -> ]TEVAL(function()) will give you your time in sec as well.

In CAS (only), there's a cool shortcut for timing any expression; just press
Sto, comma, Enter
after the expression that you wish to time. It looks like "►," until you press Enter. (Sto can be typed either from the Sto menu button or Shift EEX).

Example: wait(2)►, Enter
Magically turns into: time(WAIT(2))
Returns: 2 (approximately!).

Notes: The time() function is similar to the TEVAL() function, but returns the seconds without any unit appended. Although the 3-keystroke shortcut only works in CAS, the time() function works in both Home and CAS... but "time" must be spelled in lowercase.
Reference URL's