Add a sleep binary
This commit is contained in:
parent
8bf4e77b2f
commit
db1ff2473a
2 changed files with 16 additions and 0 deletions
|
@ -16,6 +16,7 @@ dart compile exe -o out/nbt2snbt-linux-x64 bin/nbt2snbt.dart
|
|||
dart compile exe -o out/snbt2nbt-linux-x64 bin/snbt2nbt.dart
|
||||
dart compile exe -o out/uuidgen-linux-x64 bin/uuidgen.dart
|
||||
dart compile exe -o out/pause-linux-x64 bin/pause.dart
|
||||
dart compile exe -o out/sleep-linux-x64 bin/sleep.dart
|
||||
|
||||
cd ..
|
||||
|
||||
|
|
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…
Reference in a new issue