diff --git a/engine/core/src/jobs.zig b/engine/core/src/jobs.zig index 9694823..26aa558 100644 --- a/engine/core/src/jobs.zig +++ b/engine/core/src/jobs.zig @@ -185,7 +185,7 @@ pub const JobWorker = struct { // if (self.currentJobContext != null) { // break; // } - // std.time.sleep(1000 * 1000); + // std.Thread.sleep(1000 * 1000); //} wakeGrabCount = 1; } diff --git a/engine/core/tests/tests.zig b/engine/core/tests/tests.zig index 1635a85..fa6d71b 100644 --- a/engine/core/tests/tests.zig +++ b/engine/core/tests/tests.zig @@ -46,7 +46,7 @@ pub fn test_loadModules() !void { _ = try core.loadModule("external", true); const moduleLoader = core.getEngineObject(core.ModuleLoader).?; - std.time.sleep(1e9 * 0.1); + std.Thread.sleep(1e9 * 0.1); moduleLoader.tick(0.1); } diff --git a/engine/sys/src/systemProc.zig b/engine/sys/src/systemProc.zig index 20d2df6..da7904f 100644 --- a/engine/sys/src/systemProc.zig +++ b/engine/sys/src/systemProc.zig @@ -96,7 +96,7 @@ pub const SubprocessTask = struct { pub fn wait(self: *@This()) void { var completed: bool = self.completed; while (completed == false) { - std.time.sleep(1 * 1000 * 1000); + std.Thread.sleep(1 * 1000 * 1000); self.mutex.lock(); completed = self.completed; self.mutex.unlock(); diff --git a/lib/nfd/src/nfd.zig b/lib/nfd/src/nfd.zig index 32072be..6ae94a6 100644 --- a/lib/nfd/src/nfd.zig +++ b/lib/nfd/src/nfd.zig @@ -154,7 +154,7 @@ pub const NFDRuntime = struct { } fn blockUntilComplete(self: *@This()) void { - std.time.sleep(1000 * 1000); + std.Thread.sleep(1000 * 1000); var spinning: bool = true; while (spinning) { @@ -162,7 +162,7 @@ pub const NFDRuntime = struct { if (self.runtimeState == .none) { spinning = false; } - std.time.sleep(1000 * 1000); + std.Thread.sleep(1000 * 1000); self.lock.unlock(); } } diff --git a/lib/p2/src/structures/concurrent-queue.zig b/lib/p2/src/structures/concurrent-queue.zig index c8713c2..bc643a1 100644 --- a/lib/p2/src/structures/concurrent-queue.zig +++ b/lib/p2/src/structures/concurrent-queue.zig @@ -213,7 +213,7 @@ test "concurrent queue multiple producer single consumer" { }) catch unreachable; pushedCount += 1; - std.time.sleep(1000 * 1000 * 100); + std.Thread.sleep(1000 * 1000 * 100); } _ = pushedCountResults.fetchAdd(pushedCount, .acq_rel); @@ -259,7 +259,7 @@ test "concurrent queue multiple producer single consumer" { std.debug.print("popped: {d}\t time left = {d:2.3}\t queueCount = {d} \r", .{ poppedCount, timeLeft, testQueue.count() }); } } - std.time.sleep(1000 * 1000); + std.Thread.sleep(1000 * 1000); } for (0..threadCount) |i| { diff --git a/lib/packer/tests/test.zig b/lib/packer/tests/test.zig index 1a3a5c9..60c3e9c 100644 --- a/lib/packer/tests/test.zig +++ b/lib/packer/tests/test.zig @@ -132,11 +132,11 @@ test "packer file watch" { try fs.addFileChangedCallback("test2.txt", fileChangedCb, null); var file = try std.fs.cwd().createFile("test_output/test2.txt", .{}); - std.time.sleep(100000000); + std.Thread.sleep(100000000); std.debug.print("writing to file\n", .{}); // var file = try std.fs.cwd().openFile("test_output/test2.txt", .{ .mode = .read_write }); try file.writeAll("what the fuck bro"); - std.time.sleep(400000000); - // std.time.sleep(5000000000); + std.Thread.sleep(400000000); + // std.Thread.sleep(5000000000); } diff --git a/projects/headless/main.zig b/projects/headless/main.zig index 24b6ab7..9c74ea2 100644 --- a/projects/headless/main.zig +++ b/projects/headless/main.zig @@ -16,7 +16,7 @@ pub fn prepare(self: *@This()) !void { } pub fn tick(self: *@This(), dt: f64) void { - // std.time.sleep(1000_000); + // std.Thread.sleep(1000_000); self.timeLeft -= dt; if (self.timeLeft < 0) @@ -98,7 +98,7 @@ const MultiJob = struct { pub fn tick(ctx: @This()) !void { const z = core.tracy.ZoneN(@src(), "MultiJob Tick"); defer z.End(); - // std.time.sleep(100_000 * ctx.threadId); + // std.Thread.sleep(100_000 * ctx.threadId); try Barrier(@src()).sync(ctx.threadId); } diff --git a/projects/tools/toolbox.zig b/projects/tools/toolbox.zig index 654a363..2298e37 100644 --- a/projects/tools/toolbox.zig +++ b/projects/tools/toolbox.zig @@ -41,7 +41,7 @@ pub fn prepare(self: *@This()) !void { pub fn tick(self: *@This(), dt: f64) void { _ = dt; - std.time.sleep(10 * 1000 * 1000); + std.Thread.sleep(10 * 1000 * 1000); self.tickTasks() catch {}; self.animationStore.tick(); diff --git a/testing/test-all.zig b/testing/test-all.zig index 12b9e30..30d54a5 100644 --- a/testing/test-all.zig +++ b/testing/test-all.zig @@ -135,7 +135,7 @@ pub fn prepare(self: *@This()) !void { } pub fn tick(self: *@This(), _: f64) void { - std.time.sleep(10_000_000); + std.Thread.sleep(10_000_000); var successCount: u32 = 0; if (self.testResultsQueue.count() == self.modules.items.len) {