Logo

Programming-Idioms

History of Idiom 45 > diff from v15 to v16

Edit summary for version 16 by :

Version 15

2015-08-25, 20:13:09

Version 16

2015-08-25, 20:14:05

Idiom #45 Pause execution for 5 seconds

Sleep for 5 seconds in current thread, before proceeding with next instructions.

Idiom #45 Pause execution for 5 seconds

Sleep for 5 seconds in current thread, before proceeding with next instructions.

Imports
import 'dart:io';
Imports
import 'dart:io';
Code
sleep(const Duration(seconds: 5));
Code
sleep(const Duration(seconds: 5));
Comments bubble
sleep is only available if dart:io is available (ie. on server side)
Comments bubble
sleep is only available if dart:io is available (ie. on server side)