Skip to content

Commit

Permalink
Merge pull request #3 from byte911/main
Browse files Browse the repository at this point in the history
Bugfix: modify the unit of the elapsed time
  • Loading branch information
jiacai2050 authored Dec 13, 2023
2 parents b9c8c4f + fee0af8 commit eb085a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/src/03-01.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ pub fn main() !void {
const elapsed_ns: f64 = @floatFromInt(now.since(start));

print("Time elapsed in expensive_function() is: {d:.3}ms", .{
elapsed_ns / time.ns_per_s,
elapsed_ns / time.ns_per_ms,
});
}
2 changes: 1 addition & 1 deletion src/03-01-elapsed-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn main() !void {
const elapsed_ns: f64 = @floatFromInt(now.since(start));
print("Time elapsed in expensive_function() is: {d:.3}ms", .{
elapsed_ns / time.ns_per_s,
elapsed_ns / time.ns_per_ms,
});
}
```
Expand Down

0 comments on commit eb085a8

Please sign in to comment.