Author |
Topic: timer 0, [label] (Read 613 times) |
|
tsh73
Guest
|
|
timer 0, [label]
« Thread started on: Feb 18th, 2013, 05:43am » |
|
Just found something. Works in JB: Code:t0=time$("ms")
timer 0, [label] 'like, minimal possible timer delay?
wait
[label]
timer 0 'timer off
t1=time$("ms")
print "dt", t1 - t0
Reports smallest possible timer delay (16 ms for my XP) In LBB (1.80, sorry if not latest) errors with "duplicate label". That's at least misleading error message.
Actually, meaning will not change if code Code: - and it will work in LBB as well as in JB.
|
|
Logged
|
|
|
|
tsh73
Guest
|
|
Re: timer 0, [label]
« Reply #1 on: Feb 18th, 2013, 05:50am » |
|
(I see current version is 1.86. Obviously I did not upgraded because 1.80 worked fine for me so far. I cannot download it while at work, I will try to do it at home and check on current version)
|
|
Logged
|
|
|
|
tsh73
Guest
|
|
Re: timer 0, [label]
« Reply #2 on: Feb 18th, 2013, 4:01pm » |
|
Confirmed: works the same in LBB 1.86
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: timer 0, [label]
« Reply #3 on: Feb 19th, 2013, 08:28am » |
|
on Feb 18th, 2013, 05:43am, Guest-tsh73 wrote:Just found something. Works in JB: Code:t0=time$("ms")
timer 0, [label] 'like, minimal possible timer delay? |
|
My understanding is that the syntax TIMER 0 means 'deactivate the timer', in which case adding a label afterwards doesn't make sense. As far as LBB is concerned it sees the label as the start of the next statement, hence the 'duplicate label' error message.
If you want to get the smallest-possible delay why would you not use TIMER 1, [label]? Windows timers cannot have a smaller resolution than 1 millisecond.
Richard.
|
|
Logged
|
|
|
|
tsh73
Guest
|
|
Re: timer 0, [label]
« Reply #4 on: Feb 20th, 2013, 04:28am » |
|
Hello Richard Well, I might as well use "timer 1, [label]" (and probably would in the future) - it just worked with 0 in JB/LB no problem. As for Quote:My understanding is that the syntax TIMER 0 means 'deactivate the timer', in which case adding a label afterwards doesn't make sense. |
|
LB Help says Quote:The TIMER is deactivated by setting a time value of 0, and no branch label. |
|
I interpret it differently then you said.
|
|
Logged
|
|
|
|
|