Make clock_gettime adapter work if used multiple time
This commit is contained in:
parent
ab5eb920a5
commit
35ae3b9c24
@ -9,7 +9,7 @@
|
|||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define CLOCK_REALTIME 0
|
#define CLOCK_REALTIME 0
|
||||||
int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
inline int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
int rv = gettimeofday(&now, nullptr);
|
int rv = gettimeofday(&now, nullptr);
|
||||||
if (rv) {
|
if (rv) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user