Skip to content

Commit d6eb6d2

Browse files
committed
fix units of reslution to microsec
1 parent ca2758b commit d6eb6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/html/performance.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub const Performance = struct {
3434
const ms_resolution = 100;
3535

3636
fn limited_resolution_ms(nanoseconds: u64) f64 {
37-
const elapsed_at_resolution = ((nanoseconds / std.time.ns_per_ms) + ms_resolution / 2) / ms_resolution * ms_resolution;
37+
const elapsed_at_resolution = ((nanoseconds / std.time.ns_per_us) + ms_resolution / 2) / ms_resolution * ms_resolution;
3838
const elapsed = @as(f64, @floatFromInt(elapsed_at_resolution));
3939
return elapsed / @as(f64, std.time.us_per_ms);
4040
}

0 commit comments

Comments
 (0)