HP Forums
time functions startTimer, checkTimer, tic, toc ... - 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 functions startTimer, checkTimer, tic, toc ... (/thread-3755.html)



time functions startTimer, checkTimer, tic, toc ... - compsystems - 05-01-2015 02:20 AM

Hello

I have seen the power of response in hpprime =), I want to make some comparisons with other calcs and maths pc.

I require timer commands for next firmware

Thanks

ti68K calcs
Code:
name_function(n)
 Func
   Local tm
   startTmr() → tm
   ...      
   checkTmr( tm )
   EndIf
 EndFunc


MatrixLab

Code:

tic;
toc;
disp([ ' computation time [seg] = ' num2str(toc)])



RE: time functions startTimer, checkTimer, tic, toc ... - Didier Lachieze - 05-01-2015 06:11 AM

You can already use TEVAL().


RE: time functions startTimer, checkTimer, tic, toc ... - DrD - 05-01-2015 10:46 AM

You could do a clock walk like tic toc, per your ti68k calcs and MatrixLab, ad hoc mock:

Code:

EXPORT test()
BEGIN 
  local tic:=ticks, toc;
  for toc from 1 to 6000 do end;  // Do whatever needs doing until done doing dat
  toc:=ticks;
  return ("  computation time [seg] ="+string(toc-tic));  //  disp([ ' computation time [seg] = ' num2str(toc)])
END;



RE: time functions startTimer, checkTimer, tic, toc ... - compsystems - 05-01-2015 08:26 PM

The TICKS command, not is in the catalog. =[

TEVAL is difficult to know what it means.
TimerEval or Similar
8 characters is to primitive calculators as ti68k


RE: time functions startTimer, checkTimer, tic, toc ... - Thomas_Sch - 05-01-2015 08:37 PM

(05-01-2015 08:26 PM)compsystems Wrote:  The TICKS command, not is in the catalog. =[
you could find TICKS in the the HELP system:
Code:
Syntax:
TICKS()
Returns the internal milisecond clock value.
Example:
TICKS



RE: time functions startTimer, checkTimer, tic, toc ... - compsystems - 05-01-2015 09:05 PM

I found TICKS after much searching ... in [HELP] [TREE] [MAIN] [ THE TOOLBOX MENU] [CATLG MENU] [P-T] TICKS

[CATLG MENU] should be as shortcut to the tools menu buttom


[TOOLS] menu
[MATH]
[APP]
[CAS]
[CATALOG]
[all cmds and functions ] / [a-e] [f-j] ... [u-z]
[OK]