修复
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#elif
|
#else
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
unsigned long long get_system_uptime_ms() {
|
unsigned long long get_system_uptime_ms() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return GetTickCount64();
|
return GetTickCount64();
|
||||||
#elif
|
#else
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
return (unsigned long long)(ts.tv_sec) * 1000 + ts.tv_nsec / 1000000;
|
return (unsigned long long)(ts.tv_sec) * 1000 + ts.tv_nsec / 1000000;
|
||||||
|
Reference in New Issue
Block a user