| @@ -121,7 +121,7 @@ pub fn example_async_hooks() !void { |
| 121 | 121 | fn run(alloc: std.mem.Allocator) !void { |
| 122 | 122 | _ = alloc; |
| 123 | 123 | std.debug.print("Before hook executed\n", .{}); |
| 124 | | - std.Thread.sleep(10 * std.time.ns_per_ms); |
| 124 | + zig_test.compat.sleep(10 * std.time.ns_per_ms); |
| 125 | 125 | } |
| 126 | 126 | }.run; |
| 127 | 127 | |
| @@ -129,7 +129,7 @@ pub fn example_async_hooks() !void { |
| 129 | 129 | fn run(alloc: std.mem.Allocator) !void { |
| 130 | 130 | _ = alloc; |
| 131 | 131 | std.debug.print("After hook executed\n", .{}); |
| 132 | | - std.Thread.sleep(10 * std.time.ns_per_ms); |
| 132 | + zig_test.compat.sleep(10 * std.time.ns_per_ms); |
| 133 | 133 | } |
| 134 | 134 | }.run; |
| 135 | 135 | |
| @@ -150,7 +150,7 @@ pub fn example_suite_async() !void { |
| 150 | 150 | const asyncTest1 = struct { |
| 151 | 151 | fn run(alloc: std.mem.Allocator) !void { |
| 152 | 152 | _ = alloc; |
| 153 | | - std.Thread.sleep(50 * std.time.ns_per_ms); |
| 153 | + zig_test.compat.sleep(50 * std.time.ns_per_ms); |
| 154 | 154 | std.debug.print("Suite async test 1 passed\n", .{}); |
| 155 | 155 | } |
| 156 | 156 | }.run; |
| @@ -158,7 +158,7 @@ pub fn example_suite_async() !void { |
| 158 | 158 | const asyncTest2 = struct { |
| 159 | 159 | fn run(alloc: std.mem.Allocator) !void { |
| 160 | 160 | _ = alloc; |
| 161 | | - std.Thread.sleep(50 * std.time.ns_per_ms); |
| 161 | + zig_test.compat.sleep(50 * std.time.ns_per_ms); |
| 162 | 162 | std.debug.print("Suite async test 2 passed\n", .{}); |
| 163 | 163 | } |
| 164 | 164 | }.run; |
| @@ -187,7 +187,7 @@ pub fn example_mixed_tests() !void { |
| 187 | 187 | const asyncTest = struct { |
| 188 | 188 | fn run(alloc: std.mem.Allocator) !void { |
| 189 | 189 | _ = alloc; |
| 190 | | - std.Thread.sleep(50 * std.time.ns_per_ms); |
| 190 | + zig_test.compat.sleep(50 * std.time.ns_per_ms); |
| 191 | 191 | std.debug.print("Async test executed\n", .{}); |
| 192 | 192 | } |
| 193 | 193 | }.run; |
| @@ -212,7 +212,7 @@ pub fn example_async_errors() !void { |
| 212 | 212 | const passingTest = struct { |
| 213 | 213 | fn run(alloc: std.mem.Allocator) !void { |
| 214 | 214 | _ = alloc; |
| 215 | | - std.Thread.sleep(10 * std.time.ns_per_ms); |
| 215 | + zig_test.compat.sleep(10 * std.time.ns_per_ms); |
| 216 | 216 | } |
| 217 | 217 | }.run; |
| 218 | 218 | |
| @@ -220,7 +220,7 @@ pub fn example_async_errors() !void { |
| 220 | 220 | const failingTest = struct { |
| 221 | 221 | fn run(alloc: std.mem.Allocator) !void { |
| 222 | 222 | _ = alloc; |
| 223 | | - std.Thread.sleep(10 * std.time.ns_per_ms); |
| 223 | + zig_test.compat.sleep(10 * std.time.ns_per_ms); |
| 224 | 224 | return error.AsyncTestFailed; |
| 225 | 225 | } |
| 226 | 226 | }.run; |