aboutsummaryrefslogtreecommitdiff
path: root/lib/time.c
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-08 00:47:14 -0800
committerChristian C <cc@localhost>2025-03-08 00:47:14 -0800
commit316554287a6cfa7c61c009b745c8f42f3aa30111 (patch)
tree0639a202477ffd10be1293fbc7e4cbc0a9a39cbc /lib/time.c
parent8e1541680d15a5489089bbe367892797fa59c8f2 (diff)
Time tests
Diffstat (limited to 'lib/time.c')
-rw-r--r--lib/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/time.c b/lib/time.c
index 085ef80..623a696 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -2,7 +2,7 @@
// Difference in Time
// Compute the difference between timespec structs
-double diff_time(struct timespec *time1, struct timespec *time0) {
+double diff_time(const struct timespec *time1, const struct timespec *time0) {
return (time1->tv_sec - time0->tv_sec)
+ (time1->tv_nsec - time0->tv_nsec) / 1000000000.0;
}