diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-12-01 09:21:34 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-12-01 09:22:16 +0000 |
commit | 228710c55bc4e8f69ad56ad981b25a0c4ce41a4c (patch) | |
tree | 721e58e1a4723e228e22b5a67a8f451258c2fe88 /src/time.c | |
parent | b6e898b7518777b41d9d82dd3e861a64016cbe0a (diff) | |
download | libnsutils-228710c55bc4e8f69ad56ad981b25a0c4ce41a4c.tar.gz libnsutils-228710c55bc4e8f69ad56ad981b25a0c4ce41a4c.tar.bz2 |
do not report time in future if time did not move forwards.
Diffstat (limited to 'src/time.c')
-rw-r--r-- | src/time.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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; |