chore: be more intentional in atomic ordering use

This commit is contained in:
2022-11-30 00:21:02 -04:00
parent f9aefedf60
commit 20f611b7b5
4 changed files with 10 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ pub const FpsTracker = struct {
pub fn value(self: *Self) u32 {
if (self.timer.read() >= std.time.ns_per_s) {
self.fps = self.count.swap(0, .SeqCst);
self.fps = self.count.swap(0, .Monotonic);
self.timer.reset();
}