@shd101wyy/yo 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ // std/time/sleep.yo - Synchronous sleep
2
+ //
3
+ // Blocks the current thread for the given number of milliseconds.
4
+ // For async (non-blocking) sleep, use std/sys/timer.yo instead.
5
+ //
6
+ // Example:
7
+ // { sleep } :: import "std/time/sleep";
8
+ // sleep(usize(100)); // sleep 100ms
9
+
10
+ extern "Yo",
11
+ __yo_ms_sleep : (fn(ms: usize) -> unit)
12
+ ;
13
+
14
+ sleep :: __yo_ms_sleep;
15
+
16
+ export
17
+ sleep
18
+ ;
package/std/time.yo DELETED
@@ -1,13 +0,0 @@
1
- extern "Yo",
2
- __yo_ms_sleep : (fn(ms: usize) -> unit)
3
- ;
4
-
5
- Time :: impl {
6
- sleep :: __yo_ms_sleep;
7
-
8
- export sleep;
9
- };
10
-
11
- export
12
- Time
13
- ;