GetTimerInfo(27)

Posted by Worstje on Mon 01 Sep 2008 10:12 PM — 4 posts, 11,660 views.

Netherlands #0
Can we have a GetTimerInfo(27), which returns the amount of time left until a trigger fires in the finer granularity that version 3.61 made possible? GetTimerInfo(13) isn't precise enough for what I want to do.

This could either be in milliseconds, which has my preference since it is easiest to work with, or merely the number GetTimerInfo(13) gives with a number after the decimal point.
Australia Forum Administrator #1

AddTimer ("my_timer", 0, 0, 1.5, "go north", timer_flag.Enabled, "")
print (GetTimerInfo ("my_timer", 13))  --> 1.4999950071797


That is fine-grained, what is the problem with it?
Amended on Tue 02 Sep 2008 12:57 AM by Nick Gammon
Netherlands #2
... I'm ashamed for asking a feature without checking the current one.

I was reading the documentation since I wasn't sure how I wanted to implement a particular script. I ran into GetTimerInfo(), and option 13 said:

Quote:
13: Number of seconds until timer will fire next or zero if it is due to fire immediately (this might happen if the timer is due to fire but is disabled). (long)


The long part caught my eye, and I checked the rest of the documentation to see if there was another way to get more accurate data, and there wasn't. So I figured I'd throw the suggestion on here and put implementation off a little while while I worked on another part of the script.

Anyhow, void these posts. I clearly need to test more before I post. :D
Australia Forum Administrator #3
You detected a documentation problem, it should have read "(double)" - this is fixed in the next version.