Something for reminding myself:
the client-side sleep command is currently buggy when called inside functions - the callstack is not restored (it doesnt return to the position in the script where the function has been called),
and when called in an timeout-event (if (timeout) sleep xxx

- it doesnt stop the code at the current position.