yslog: use monotonic clock for timestamp when available

This commit is contained in:
Jussi Kivilinna
2017-04-26 10:38:15 -06:00
committed by Gregory Nutt
parent 2f9028b547
commit e835803166
2 changed files with 19 additions and 4 deletions
+2 -1
View File
@@ -68,7 +68,8 @@
#define SEC_PER_HOUR ((time_t)60 * SEC_PER_MIN)
#define SEC_PER_DAY ((time_t)24 * SEC_PER_HOUR)
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SYSTEM_TIME64)
#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SYSTEM_TIME64) && \
defined(CONFIG_CLOCK_MONOTONIC)
/* Initial system timer ticks value close to maximum 32-bit value, to test
* 64-bit system-timer after going over 32-bit value. This is to make errors
* of casting 64-bit system-timer to 32-bit variables more visible.