diff options
author | Lars Müller <34514239+appgurueu@users.noreply.github.com> | 2021-02-24 12:05:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 12:05:17 +0100 |
commit | b5eda416cea3157ae3590fb7d229cd2cd17c3bf9 (patch) | |
tree | 71f6fc3b0fee3188cdecee8b52bbc558a39843e1 /src | |
parent | d51d0d77c4e88dec8f9670942e19595cbb3a0234 (diff) | |
download | minetest-b5eda416cea3157ae3590fb7d229cd2cd17c3bf9.tar.gz minetest-b5eda416cea3157ae3590fb7d229cd2cd17c3bf9.tar.bz2 minetest-b5eda416cea3157ae3590fb7d229cd2cd17c3bf9.zip |
Slap u64 on everything time-y (#10984)
Diffstat (limited to 'src')
-rw-r--r-- | src/porting.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/porting.h b/src/porting.h index e4ebe36fd..93932e1d9 100644 --- a/src/porting.h +++ b/src/porting.h @@ -234,21 +234,21 @@ inline u64 getTimeMs() { struct timespec ts; os_get_clock(&ts); - return ts.tv_sec * 1000 + ts.tv_nsec / 1000000; + return ((u64) ts.tv_sec) * 1000LL + ((u64) ts.tv_nsec) / 1000000LL; } inline u64 getTimeUs() { struct timespec ts; os_get_clock(&ts); - return ts.tv_sec * 1000000 + ts.tv_nsec / 1000; + return ((u64) ts.tv_sec) * 1000000LL + ((u64) ts.tv_nsec) / 1000LL; } inline u64 getTimeNs() { struct timespec ts; os_get_clock(&ts); - return ts.tv_sec * 1000000000 + ts.tv_nsec; + return ((u64) ts.tv_sec) * 1000000000LL + ((u64) ts.tv_nsec); } #endif |