mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Add time unit suffixes to variables (#561)
Add suffixes like Ms and Ns to variables whos time unit is not in seconds. This is aligning with a new code style of putting units on variables that are not in SI base units.
This commit is contained in:
1 parent
9842705eb9
commit
c53781d16c
38 files changed
+221
-201
No files matched your search
+2
-2
@@ -21,10 +21,10 @@ describe("lib/helpers", function() {
|
||||
it("should wait the approximate amount of time given", async function() {
|
||||
let startNs = hrtime();
|
||||
await lib.wait(100);
|
||||
let duration = Number(hrtime() - startNs) / 1e6;
|
||||
let durationMs = Number(hrtime() - startNs) / 1e6;
|
||||
|
||||
// On windows the time waited is normally up to 15 ms late with outliers in the 20ms range.
|
||||
assert(duration > 90 && duration < 130, `duration (${duration}ms) not within (90-130)`);
|
||||
assert(durationMs > 90 && durationMs < 130, `duration (${durationMs}ms) not within (90-130)`);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user