修复
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
#include "IS3Comon.h"
|
#include "IS3Comon.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <Communication_Protocol.h>
|
|
||||||
#elif
|
#elif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -10,8 +10,8 @@
|
|||||||
#define _POSIX_C_SOURCE 199309L
|
#define _POSIX_C_SOURCE 199309L
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#include <cstring>
|
||||||
|
#include <Communication_Protocol.h>
|
||||||
|
|
||||||
unsigned long long get_system_uptime_ms() {
|
unsigned long long get_system_uptime_ms() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -20,6 +20,7 @@ unsigned long long get_system_uptime_ms() {
|
|||||||
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;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user