LCOV - code coverage report
Current view: top level - engine/time/internal - steady_clock.hpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 3 3
Test Date: 2026-03-11 04:45:14 Functions: 100.0 % 1 1

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <jage/engine/time/durations.hpp>
       4              : 
       5              : #include <chrono>
       6              : 
       7              : namespace jage::engine::time::internal {
       8              : template <class TDuration> struct steady_clock {
       9              :   using rep = typename TDuration::rep;
      10              :   using period = typename TDuration::period;
      11              :   using duration = TDuration;
      12              :   using time_point = std::chrono::time_point<steady_clock>;
      13              :   static constexpr auto is_steady = true;
      14              : 
      15            1 :   [[nodiscard]] static auto now() -> time_point {
      16              :     return time_point{
      17            1 :         std::chrono::time_point_cast<duration>(std::chrono::steady_clock::now())
      18            1 :             .time_since_epoch()};
      19              :   }
      20              : };
      21              : 
      22              : static_assert(std::chrono::is_clock_v<steady_clock<nanoseconds>>);
      23              : } // namespace jage::engine::time::internal
        

Generated by: LCOV version 2.0-1