[Gambas-user] Timer backwards?
Bruce Steers
bsteers4 at gmail.com
Sun Mar 7 01:10:04 CET 2021
Doh derrr!
I doubted myself here and mis-thought it but actually i realised i was
right the first time :-\
If you run Stopwatch1.Start then the first Time_Timer event would happen 1
second later.
so 1 second HAS passed , so it is not in error and i was right the first
time round :^)
* If $iCountDown > 0 Then Return*
Sorry about that.
On Fri, 5 Mar 2021 at 17:57, Bruce Steers <bsteers4 at gmail.com> wrote:
>
> Public Sub Time_Timer()
>> Dec $iCountDown
>> If $iCountDown > 0 Then Return
>> $Timer.Stop
>> Raise ZeroReached
>> End
>>
>
> Oops , sorry, correction.
> The first 2 lines of that function are in error because if the countdown
> was 1 second it would instantly become zero so it is 1 second out.
>
> * If $iCountDown > -1 Then Return*
>
> Would fix that :)
> BruceS
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210307/6e5be157/attachment.htm>
More information about the User
mailing list