From 3f2af32442b9384d316651d42ad35945533dc39e Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Mon, 11 Nov 2024 23:26:33 +0100 Subject: Add timespec utils --- src/comet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/comet.c') diff --git a/src/comet.c b/src/comet.c index 6fccb3d..a539015 100644 --- a/src/comet.c +++ b/src/comet.c @@ -124,7 +124,7 @@ int main(int argc, char **argv) layout_free(&layout); timespec_get(&end, TIME_UTC); - diff = timespec_diff(timespec_diff(end, start), rate); + diff = timespec_diff(rate, timespec_diff(end, start)); nanosleep(&diff, NULL); } -- cgit v1.2.3