From 1787b1add553511792580158e75be43cd54c108b Mon Sep 17 00:00:00 2001 From: Suyash Mahar Date: Tue, 14 May 2024 12:24:53 -0700 Subject: [PATCH] Add us, ms, and s methods to the clock --- include/nvsl/clock.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/nvsl/clock.hh b/include/nvsl/clock.hh index cd0e2e0..6977967 100644 --- a/include/nvsl/clock.hh +++ b/include/nvsl/clock.hh @@ -102,6 +102,9 @@ namespace nvsl { } size_t ns() const { return this->total_ns; } + size_t us() const { return this->total_ns / 1000; } + size_t ms() const { return this->total_ns / 1000000; } + size_t s() const { return this->total_ns / 1000000000; } /** @brief Total time elapsed */ const std::string summarize() const {