aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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;
}