Radium Engine  1.5.20
Loading...
Searching...
No Matches
Timer.hpp
1#pragma once
2
3#include <Core/RaCore.hpp>
4#include <chrono>
5
6namespace Ra {
7namespace Core {
8// Convenience functions for timing.
9// Wrapping the highest resolution time measuring.
10namespace Utils {
12using TimePoint = std::chrono::time_point<Clock>;
13
14inline long RA_CORE_API getIntervalMicro( const TimePoint& start, const TimePoint& end ) {
15 return ( std::chrono::duration_cast<std::chrono::microseconds>( end - start ) ).count();
16}
17
18inline Scalar RA_CORE_API getIntervalSeconds( const TimePoint& start, const TimePoint& end ) {
21 .count();
22}
23
24} // namespace Utils
25} // namespace Core
26} // namespace Ra
T duration_cast(T... args)
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3