diff options
-rw-r--r-- | src/vppinfra/time_range.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vppinfra/time_range.c b/src/vppinfra/time_range.c index 54f5629641a..72ed840e7c1 100644 --- a/src/vppinfra/time_range.c +++ b/src/vppinfra/time_range.c @@ -120,7 +120,7 @@ clib_timebase_time_to_components (f64 now, clib_timebase_component_t * cp) now = now - ((f64) days_in_year) * 86400.0; year++; } - while (now > 0.0); + while (now >= 0.0); days_since_epoch -= days_in_year; now += ((f64) days_in_year) * 86400; @@ -138,7 +138,7 @@ clib_timebase_time_to_components (f64 now, clib_timebase_component_t * cp) now = now - ((f64) days_in_month) * 86400.0; month++; } - while (now > 0.0); + while (now >= 0.0); days_since_epoch -= days_in_month; now += ((f64) days_in_month) * 86400; @@ -151,7 +151,7 @@ clib_timebase_time_to_components (f64 now, clib_timebase_component_t * cp) day_of_month++; days_since_epoch++; } - while (now > 0.0); + while (now >= 0.0); day_of_month--; days_since_epoch--; |