Skip to content

Commit

Permalink
Add us, ms, and s methods to the clock
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashmahar committed May 14, 2024
1 parent e23b6cd commit 1787b1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/nvsl/clock.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1787b1a

Please sign in to comment.