Time measurement of a function - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Time measurement of a function (/thread-4901.html) |
Time measurement of a function - Powersoft - 10-08-2015 10:46 AM Hi all, I need to know how long it takes to execute a function. Please can you help me with this. Cheers Jan RE: Time measurement of a function - Powersoft - 10-08-2015 11:18 AM Problem solved, using TICKS gives the right result RE: Time measurement of a function - Tim Wessman - 10-08-2015 03:45 PM TEVAL(function()) will give you your time in sec as well. RE: Time measurement of a function - Joe Horn - 10-09-2015 03:15 AM (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. |