Add a sleep binary
This commit is contained in:
parent
8bf4e77b2f
commit
db1ff2473a
2 changed files with 16 additions and 0 deletions
15
dart/bin/sleep.dart
Normal file
15
dart/bin/sleep.dart
Normal file
|
@ -0,0 +1,15 @@
|
|||
import 'package:libac_dart/utils/IOTools.dart';
|
||||
|
||||
Future<void> main(List<String> args) async {
|
||||
int seconds = int.parse(args[0]);
|
||||
prnt("\rPlease Wait $seconds second(s)...");
|
||||
|
||||
while(seconds>=0) {
|
||||
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
|
||||
seconds--;
|
||||
}
|
||||
|
||||
prnt("\r\n");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue