diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2017-05-26 14:03:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-26 14:03:36 +0200 |
commit | d99b6fed5517797bfafe4bbb307963967f0ca749 (patch) | |
tree | 0a4ff946a9d8bbcd1e921d3981eec96e988bc5c8 /src/unittest/test.cpp | |
parent | 4d5ce8478c959a4ee5b13ef9ba7e46b28d089a21 (diff) | |
download | hax-minetest-server-d99b6fed5517797bfafe4bbb307963967f0ca749.tar.gz hax-minetest-server-d99b6fed5517797bfafe4bbb307963967f0ca749.zip |
Time: Change old `u32` timestamps to 64-bit (#5818)
MacOSX build fix + cleanups
Diffstat (limited to 'src/unittest/test.cpp')
-rw-r--r-- | src/unittest/test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 9d223b82d..570807ba7 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -229,7 +229,7 @@ bool run_tests() { DSTACK(FUNCTION_NAME); - u32 t1 = porting::getTime(PRECISION_MILLI); + u64 t1 = porting::getTimeMs(); TestGameDef gamedef; g_logger.setLevelSilenced(LL_ERROR, true); @@ -246,7 +246,7 @@ bool run_tests() num_total_tests_run += testmods[i]->num_tests_run; } - u32 tdiff = porting::getTime(PRECISION_MILLI) - t1; + u64 tdiff = porting::getTimeMs() - t1; g_logger.setLevelSilenced(LL_ERROR, false); @@ -273,12 +273,12 @@ bool run_tests() bool TestBase::testModule(IGameDef *gamedef) { rawstream << "======== Testing module " << getName() << std::endl; - u32 t1 = porting::getTime(PRECISION_MILLI); + u64 t1 = porting::getTimeMs(); runTests(gamedef); - u32 tdiff = porting::getTime(PRECISION_MILLI) - t1; + u64 tdiff = porting::getTimeMs() - t1; rawstream << "======== Module " << getName() << " " << (num_tests_failed ? "failed" : "passed") << " (" << num_tests_failed << " failures / " << num_tests_run << " tests) - " << tdiff |