![]() |
HP PRIME - How to convert TICKS in hours, minutes, seconds - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP PRIME - How to convert TICKS in hours, minutes, seconds (/thread-255399.html) |
HP PRIME - How to convert TICKS in hours, minutes, seconds - giancarlo - 11-10-2013 Hello, Do you know how to convert these TICKS() in hours, minutes and seconds? thanks
Giancarlo Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Gilles Carpentier - 11-10-2013 By te way you can use TIME instead of TICKS then : ->HMS(TIME) Edit : Not documented as far I know,but it seems one TICK is exactly 1/1000 sec so
T1:=TICKS;
Edited: 10 Nov 2013, 4:25 a.m. after one or more responses were posted
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - giancarlo - 11-10-2013 Hello Gilles, Tres cordialement
Giancarlo
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Harold A Climer - 11-10-2013 Quote:Tim from HP wrote the following when I asked if the New Prime had a stopwatch function. Very simple and very preliminary but be useful in answering your question.
EXPORT STOPWATCH() rect(); //clear screen local start:=ticks,count:=0; //make some locals
while getkey()==-1 do //while no key is pressed
expr(string((ticks-start)/1000)+"_s"); //make a nice result
Note: In forum message listing the arrow before HMS((ticks- Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - giancarlo - 11-10-2013 Hello Harold, Do you know if the is a DATE command? Thanks
Giancarlo
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Paul Berger (Canada) - 11-10-2013 I just tried 'Date' on the home screen of the emulator and it returned 2013.111 which would seem to be Year.MonthDay but the final 0 of the day is dropped. Similarly Time return the time in degrees minutes and seconds... When I change the display format to fixed 4 the final 0 is displayed and Date returns 2013.1110
Hmmm interesting 'time' and 'Time' return different values the all lower case returns 0.0000 like it may be used to time a function. These functions are all documented in Help however you will not find the lower case format of 'time' by searching it will always find 'Time' The 'time' is found under Program Catalog->Commands Menu->Other where it is listed as 'TIME' which is obviously incorrect it needs to be 'time' all lower case 'TIME'='Time' In CAS mode it appears Time return a decimal time rather than in DMS
Edited: 10 Nov 2013, 10:58 a.m.
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Tim Wessman - 11-10-2013 TICKS is in ms and represnts the time since the OS came up.
TIME is your user settable time value.
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - cyrille de Brébisson - 11-12-2013 Hello, try doing TIME(expression) to time your expression evaluation (note that this expression can be a program call... Here is your pre-made stop watch!
cyrille
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Paul Berger (Canada) - 11-12-2013 hmmm TIME(SLOPE(x^2-5,2)) returns 0_s time(SLOPE(x^2-5,2)) returns .00009000. TIME by itself returns the time of day as does Time.
Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Harold A Climer - 11-12-2013 Quote:I was thinking that since the Prime is education oriented and that it will be able to connect to the StreamSmart,it would be nice to have a Stopwatch App as one of the built in Apps. This was why I asked Tim the question in the first place. Students could use the Prime as a stopwatch for various Physics,Chemistry ,etc labs without having to write a program. It would need to be similar to a stopwatch program recently uploaded to Eric's Web Site,for the 50G. Re: HP PRIME - How to convert TICKS in hours, minutes, seconds - Joe Horn - 11-12-2013 Quote:When timing events with TIME(), only do it in Home, not CAS. It currently always returns 0_s in CAS... a known bug.
TIME(wait(2) in Home --> 2_s
The time() function works in both Home and CAS, but doesn't include the seconds unit.
|