--- libelwix/src/time.c 2015/06/25 17:53:50 1.5 +++ libelwix/src/time.c 2022/12/01 19:50:46 1.5.72.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: time.c,v 1.5 2015/06/25 17:53:50 misho Exp $ +* $Id: time.c,v 1.5.72.1 2022/12/01 19:50:46 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2015 +Copyright 2004 - 2022 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -287,7 +287,11 @@ time_rdtsc(void) /* unsupported for this architecture, get time by ordinary way */ struct timespec ts = { 0, 0LL }; +#ifndef CLOCK_UPTIME_PRECISE + clock_gettime(CLOCK_MONOTONIC, &ts); +#else clock_gettime(CLOCK_UPTIME_PRECISE, &ts); +#endif return ((uint64_t) ts.tv_sec * 1000000000 + ts.tv_nsec); #endif }