123456789101112131415161718192021222324252627282930 |
- #ifndef TWOBLUECUBES_CATCH_TIMER_H_INCLUDED
- #define TWOBLUECUBES_CATCH_TIMER_H_INCLUDED
- #include <cstdint>
- namespace Catch {
- auto getCurrentNanosecondsSinceEpoch() -> uint64_t;
- auto getEstimatedClockResolution() -> uint64_t;
- class Timer {
- uint64_t m_nanoseconds = 0;
- public:
- void start();
- auto getElapsedNanoseconds() const -> uint64_t;
- auto getElapsedMicroseconds() const -> uint64_t;
- auto getElapsedMilliseconds() const -> unsigned int;
- auto getElapsedSeconds() const -> double;
- };
- }
- #endif
|