Time functions for HP Prime

Publicado el por

Time functions for HP Prime


This time we’ll discuss the pure short term time functions, not the ones related with days between dates, day of the week, etc. We’ll discuss functions that return seconds of milliseconds.

Did you know that you could use the HP Prime as a stopwatch for your experiments in class? You have several functions that can do the trick.

On one side, you have the TICKS function. It returns the internal millisecond clock value. While this function is not exactly what you were looking in itself, the point here is that you can subtract the value of the function at two different moments in time, and you’ll get the number of milliseconds between these two moments. You can prepare a simple program where you launch a subroutine with an input function, that triggers the tick function and stores its result in a variable, and then you launch another in order to end, store the result in a different value, subtract both, divide by 1000 and you have the number of seconds between the two events that triggered the function.

There is another possibility, which is very neat: using the function TEVAL(). It returns the time in seconds that it takes to evaluate its argument. So, if the argument is a program you have created, that, for example, ends when you press a key, the function will return the number of seconds since you started it until you pressed a key. Neat, isn’t it?

Can any of you provide one of such small programs?

Comentarios: 0
Más sobre: HP prime, time functions

Solo los usuarios registrados pueden poner comentarios.
Identificarse y añadir comentario Regístrese ahora