]> git.lizzy.rs Git - minetest.git/blobdiff - src/unittest/test.h
Fix arm inertia limit case
[minetest.git] / src / unittest / test.h
index e60e657cc969cf43c1cb47c1ab3fbf5982bf347e..bf76e8bb248e849d86677642408bbee0488d2e34 100644 (file)
@@ -33,7 +33,7 @@ class TestFailedException : public std::exception {
 
 // Runs a unit test and reports results
 #define TEST(fxn, ...) do {                                                   \
-       u32 t1 = porting::getTime(PRECISION_MILLI);                               \
+       u64 t1 = porting::getTimeMs();                                            \
        try {                                                                     \
                fxn(__VA_ARGS__);                                                     \
                rawstream << "[PASS] ";                                               \
@@ -46,7 +46,7 @@ class TestFailedException : public std::exception {
                num_tests_failed++;                                                   \
        }                                                                         \
        num_tests_run++;                                                          \
-       u32 tdiff = porting::getTime(PRECISION_MILLI) - t1;                       \
+       u64 tdiff = porting::getTimeMs() - t1;                                    \
        rawstream << #fxn << " - " << tdiff << "ms" << std::endl;                 \
 } while (0)