summaryrefslogtreecommitdiff
path: root/src/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/time.c')
-rw-r--r--src/time.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/time.c b/src/time.c
index 10e2705..94139c3 100644
--- a/src/time.c
+++ b/src/time.c
@@ -87,12 +87,10 @@ nsuerror nsu_getmonotonic_ms(uint64_t *current_out)
#endif
/* ensure time never goes backwards */
- if (current > prev) {
+ if (current >= prev) {
*current_out = current;
prev = current;
} else {
- /** \todo is 1ms really correct or can we calculate a delta going forwards? */
- prev += 1;
*current_out = prev;
}
return NSUERROR_OK;