Sleep for the duration specified in duration.
Use this with care, as no asynchronous operations can be processed in a isolate while it is blocked in a sleep call.