mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
Merge pull request #34 from jserv/use-clock_gettime
Use clock_gettime() instead of timespec_get()
This commit is contained in:
commit
460ac23307
1 changed files with 2 additions and 2 deletions
|
@ -312,10 +312,10 @@ static double mi_clock_now() {
|
|||
}
|
||||
#else
|
||||
#include <time.h>
|
||||
#ifdef TIME_UTC
|
||||
#ifdef CLOCK_REALTIME
|
||||
static double mi_clock_now() {
|
||||
struct timespec t;
|
||||
timespec_get(&t, TIME_UTC);
|
||||
clock_gettime(CLOCK_REALTIME, &t);
|
||||
return (double)t.tv_sec + (1.0e-9 * (double)t.tv_nsec);
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue