mirror of
https://github.com/halpz/re3.git
synced 2025-08-03 07:00:24 +00:00
added FreeBSD support
This commit is contained in:
@ -209,7 +209,11 @@ double
|
|||||||
psTimer(void)
|
psTimer(void)
|
||||||
{
|
{
|
||||||
struct timespec start;
|
struct timespec start;
|
||||||
|
#ifdef __linux__
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||||
|
#elif __FreeBSD__
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
|
#endif
|
||||||
return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0;
|
return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user