mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix wrong clock_id in function time_now_us
Close https://github.com/espressif/esp-idf/issues/7561
This commit is contained in:
parent
f80c0e8d31
commit
2e8f0a47ff
@ -397,7 +397,7 @@ static UINT64 time_now_us(void)
|
||||
{
|
||||
#if _POSIX_TIMERS
|
||||
struct timespec ts_now;
|
||||
clock_gettime(CLOCK_BOOTTIME, &ts_now);
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts_now);
|
||||
return ((UINT64)ts_now.tv_sec * 1000000L) + ((UINT64)ts_now.tv_nsec / 1000);
|
||||
#else
|
||||
struct timeval ts_now;
|
||||
|
Loading…
Reference in New Issue
Block a user