The stats printing function expected this in seconds
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return NULL;
}
-unsigned long timespec_delta(struct timespec* t1, struct timespec* t2) {
- // Compute delta in milliseconds
+double timespec_delta(struct timespec* t1, struct timespec* t2) {
+ // Compute delta in seconds
return (
((t1->tv_sec * 1000) + (t1->tv_nsec / 1000000))
-
char* format_size(ssize_t size, int unit);
const char* format_timespec(const struct timespec* t);
-unsigned long timespec_delta(struct timespec* t1, struct timespec* t2);
+double timespec_delta(struct timespec* t1, struct timespec* t2);