aboutsummaryrefslogtreecommitdiff
path: root/src/timer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.cc')
-rw-r--r--src/timer.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/timer.cc b/src/timer.cc
index c46017c..162b3fe 100644
--- a/src/timer.cc
+++ b/src/timer.cc
@@ -13,4 +13,11 @@ double millisecondsSince(
).count();
}
+double secondsSince(
+ std::chrono::time_point<std::chrono::high_resolution_clock>& pit) {
+ return std::chrono::duration_cast<std::chrono::seconds>(
+ now() - pit
+ ).count();
+}
+
}