delay

Hello

i would like to know how it’s possible to delay an action with MIOS, without if possible, the use of the clockbox :slight_smile:

Let me explain :

I would like for example to call a function when i push a button after, let’s say, one second.

Or to be able to clear the screen after 5 seconds of midi unactivity.

I guess i have to count some kind of system tiks, but i have no clue where to look at !

I hope this is clear, thanks very much for any help !

Hi Bill,

you can either use MIOS_GPCounterGet() which is incremented every millisecond or setup your own timer.

Both can be found in the function reference.

Hope this helps,

Best regards,

Michael

thanks Michael, Yes, it help a lot !! :smiley:

this topic helped me too : http://www.midibox.org/forum/index.php?topic=7779.0 :wink: