LCOV - code coverage report
Current view: top level - app/src/utils - timer.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 9 0.0 %
Date: 2023-08-17 16:45:52 Functions: 0 3 0.0 %

          Line data    Source code
       1             : #include "utils/timer.hpp"
       2             : 
       3             : using namespace std;
       4             : using namespace utils;
       5             : 
       6           0 : timer::timer():
       7           0 :     start(clock::now()) {}
       8             : 
       9           0 : void timer::tick() {
      10           0 :     start = clock::now();
      11           0 : }
      12             : 
      13           0 : double timer::tock() const {
      14             :     // clang-format off
      15           0 :     return (double)std::chrono::duration_cast<std::chrono::nanoseconds>(
      16           0 :         clock::now() - start
      17           0 :     ).count() * 1.0e-9;
      18             :     // clang-format on
      19             : }

Generated by: LCOV version 1.14