Функция sleep
void sleep(Подождать указанное время.
Используйте с осторожностью, так как асинхронные операции не могут быть обработаны в изолированном потоке, пока он заблокирован вызовом sleep.
Исходный код
void sleep(Duration duration) {
int milliseconds = duration.inMilliseconds;
if (milliseconds < 0) {
throw new ArgumentError("sleep: duration cannot be negative");
}
_ProcessUtils._sleep(milliseconds);
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-io/sleep.html