Post Reply 
bugs about TICKS function
05-04-2018, 05:10 AM (This post was last modified: 05-04-2018 05:10 AM by wangchong01.)
Post: #1
bugs about TICKS function
Hello,
I found that the system tick of HP Prime runs backwards 10ms sometimes, for example:
<code>
EXPORT main()
BEGIN
LOCAL lt:=TICKS(),tt;
WHILE 1 DO
tt:=TICKS();
IF tt<lt THEN
PRINT(lt+" "+tt);
END;
lt:=tt;
END;
END;
</code>
Then I get lots of tt=lt-10.
Find all posts by this user
Quote this message in a reply
05-04-2018, 10:20 PM
Post: #2
RE: bugs about TICKS function
(05-04-2018 05:10 AM)wangchong01 Wrote:  Hello,
I found that the system tick of HP Prime runs backwards 10ms sometimes, for example:
<code>
EXPORT main()
BEGIN
LOCAL lt:=TICKS(),tt;
WHILE 1 DO
tt:=TICKS();
IF tt<lt THEN
PRINT(lt+" "+tt);
END;
lt:=tt;
END;
END;
</code>
Then I get lots of tt=lt-10.

Congratulations! You've built a time machine (albeit for very small jumps)

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
05-07-2018, 04:13 PM
Post: #3
RE: bugs about TICKS function
Interesting: When replicating the issue I found the 10 ms jumps but only in cases when times were multiples of 10 ms. That is, lt = XXX90 and tt = XXX80, BUT NOT lt = XXX93 and tt = XXX83. A piece of the puzzle perhaps.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)