Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Toggle main menu visibility
Loading...
Searching...
No Matches
src
utils
ScopedTimer.h
1
#pragma once
2
3
#include <
chrono
>
4
#include <
string
>
5
6
namespace
util
{
7
14
class
ScopedTimer
{
15
public
:
23
ScopedTimer
(
std::string
name);
24
30
ScopedTimer
();
31
32
~ScopedTimer
();
33
39
std::chrono::microseconds
elapsedTime
()
const
;
40
41
private
:
42
std::chrono::time_point<std::chrono::high_resolution_clock>
startTime;
43
std::string
name;
44
};
45
46
}
// namespace util
chrono
string
std::string
_GLIBCXX_END_NAMESPACE_CXX11 typedef basic_string< char > string
std::chrono::microseconds
duration< int64_t, micro > microseconds
std::chrono::time_point
util::ScopedTimer::ScopedTimer
ScopedTimer()
Create an unnamed scoped timer.
Definition
ScopedTimer.cpp:10
util::ScopedTimer::ScopedTimer
ScopedTimer(std::string name)
Create a scoped timer with the specified name.
Definition
ScopedTimer.cpp:7
util::ScopedTimer::elapsedTime
std::chrono::microseconds elapsedTime() const
Gets the elapsed time measured by this timer.
Definition
ScopedTimer.cpp:20
util
A collection of utility functions and classes with common use-cases.
Definition
SwerveController.cpp:145
Generated by
1.17.0