1 |
{ The wait function can be used to suspend execution of the current event |
2 |
handler for the given amount of microseconds. Note that execution of an event |
3 |
handler might also be automatically suspended by the sampler in case its |
4 |
execution exceeded at certain limit in time. |
5 |
|
6 |
If you script might get suspended for the reasons mentioned above, you should |
7 |
be aware that all variables are global variables by default. So after a |
8 |
suspended event handler execution is woken up again, the respective global |
9 |
variables might not reflect what you wanted them to be, because in the |
10 |
meantime other execution instances of your script might have altered them |
11 |
already. In case this is an undesired behavior for you, then you should use |
12 |
the "polyphonic" variable type for the respective variable instead. |
13 |
} |
14 |
|
15 |
on note |
16 |
message("function should suspend now") |
17 |
wait(1000000) |
18 |
message("this would be after suspension of 1000000 microseconds") |
19 |
end on |