27 std::int64_t node = 0;
29 node = _clock.restart().asMicroseconds();
31 node = _clock.reset().asMicroseconds();
38 return _clock.getElapsedTime().asMicroseconds();
62 std::string indentation =
"";
63 for (
unsigned int i = 0; i < indent; ++i) {
66 std::string result = indentation +
"Clock:\n";
This is the file that contains the Clock class.
A class for managing time tracking within the ECS system.
const std::int64_t getElapsedTime() const
Gets the elapsed time since the clock was last reset.
void stop()
Stops the clock.
const std::string getInfo(const unsigned int indent=0) const
This is a function meant for debugging purposes It will dump the current state of the variables upon ...
const bool isRunning() const
Checks if the clock is currently running.
Clock(const std::uint32_t entityId=0)
Construct a new Clock object.
const std::int64_t reset()
Resets the clock and returns the elapsed time since the last reset.
~Clock()
Destroy the Clock object.
void start()
Starts the clock.
std::ostream & operator<<(std::ostream &os, const Clock &item)
Outputs the clock's info to a stream.
const std::string myToString(const Rect< RectType > &rectangle)
Converts a Rect<T> object to its string representation.