From ebd05fa00826c366922e619b012a0684c6856539 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 23 Jan 2020 17:11:54 +0100 Subject: [PATCH] stats: Use nanoseconds from epoch for schedmiss Using monotonic time is not working because it doesn't have to match time from epoch. Signed-off-by: Jan Friesse Reviewed-by: Christine Caulfield --- exec/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exec/main.c b/exec/main.c index fb0486e..821d97e 100644 --- a/exec/main.c +++ b/exec/main.c @@ -836,7 +836,8 @@ static void timer_function_scheduler_timeout (void *data) "(threshold is %0.4f ms). Consider token timeout increase.", (float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC); - stats_add_schedmiss_event(tv_current / 1000, (float)tv_diff / QB_TIME_NS_IN_MSEC); + stats_add_schedmiss_event(qb_util_nano_from_epoch_get() / QB_TIME_NS_IN_MSEC, + (float)tv_diff / QB_TIME_NS_IN_MSEC); } /* -- 1.8.3.1