Loading...
Searching...
No Matches
Timer.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_TIMER_HPP
12#define CUBBYFLOW_TIMER_HPP
13
14#include <chrono>
15
16namespace CubbyFlow
17{
19class Timer
20{
21 public:
24
26 [[nodiscard]] double DurationInSeconds() const;
27
29 void Reset();
30
31 private:
32 std::chrono::steady_clock::time_point m_startingPoint;
33};
34} // namespace CubbyFlow
35
36#endif
Simple timer class.
Definition Timer.hpp:20
double DurationInSeconds() const
Returns the time duration since the creation or reset in seconds.
Timer()
Constructs the timer and start ticking.
void Reset()
Resets the timer.
Definition pybind11Utils.hpp:21
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738