aboutsummaryrefslogtreecommitdiff
path: root/backend/src/repos/users_repo.zig
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/repos/users_repo.zig')
-rw-r--r--backend/src/repos/users_repo.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/src/repos/users_repo.zig b/backend/src/repos/users_repo.zig
index 0f4ea82..9bde514 100644
--- a/backend/src/repos/users_repo.zig
+++ b/backend/src/repos/users_repo.zig
@@ -39,7 +39,7 @@ pub fn check_password(allocator: std.mem.Allocator, conn: zqlite.Conn, email: []
defer row.deinit();
const hash = row.text(0);
const verify_options = bcrypt.VerifyOptions{ .silently_truncate_password = false };
- std.time.sleep(100000000 + rand.intRangeAtMost(u32, 0, 100000000));
+ std.Thread.sleep(100000000 + rand.intRangeAtMost(u32, 0, 100000000));
bcrypt.strVerify(hash, password, verify_options) catch {
return null;
};
@@ -48,7 +48,7 @@ pub fn check_password(allocator: std.mem.Allocator, conn: zqlite.Conn, email: []
.name = try allocator.dupe(u8, row.text(2)),
};
} else {
- std.time.sleep(500000000 + rand.intRangeAtMost(u32, 0, 500000000));
+ std.Thread.sleep(500000000 + rand.intRangeAtMost(u32, 0, 500000000));
return null;
}
}