Page 2 of 2

Re: using timer

Posted: Tue Sep 01, 2015 9:38 pm
by zylesea
stefff285 wrote:hello my dear bugala how are you

ys i simply would like to display some 30 or more images as this

starttimer(1, 400)
displaybrush(1, 0, 0)
stoptimer(1)
starttimer(2, 400)
displaybrush(2, 0, 0)

and so on

thanx a lot

stéphane
If you just want to bluntly wait why not use wait(). For simple waiting things it's the most easy thing. Downside: during the waiting you cannot process other thing.

Code: Select all

displaybrush(1, 0, 0)
wait(20) ;waits 400ms
displaybrush(2, 0, 0)
wait(20) ;waits 400ms
(...)
displaybrush(n, 0, 0)

AFAIK know your syntax is wrong anyway. I think it should be:

Code: Select all

starttimer(n)
displaybrush(1, 0, 0)
waittimer(n,time) ;time=your waiting time in ms
stoptimer()
And if using timers, I wouldn't not start a new timer for every process, you can reset the timer if needed. But if you don't want to do something while waiting wait() is by far the easier way, timers are mostly good for waiting a certain ammount of time _while_ doing somethimg else or to stopmeasure time elapsed between some events.

Re: using timer

Posted: Wed Sep 02, 2015 11:46 am
by stefff285
hello zylesia ! yes i go try your second solution because a .mod will be played at the same time
thanx a lot

stéphane

Re: using timer

Posted: Fri Sep 04, 2015 10:52 am
by stefff285
ok i'm back yes
wait(100) is good ! the .mod can be played at the same time

thanx a lot