Measure elapsed time between events. More...
#include <Timer.hpp>
Public Types | |
using | event_t = Event<Exec> |
Public Member Functions | |
void | reset (const Exec &exec) |
Reset the timer. | |
void | stop (const Exec &exec) |
Stop the timer. | |
bool | is_valid () const |
Returns true if reset and stop have been called. | |
template<typename Duration = milliseconds> | |
Duration | duration () |
Measure elapsed time between events.
This class uses Event to create, destroy, record, and compute the elapsed time between events.
using Kokkos::utils::timer::Timer< Exec >::event_t = Event<Exec> |
|
inline |
Get a std::chrono::duration
object representing the elapsed time.
const
because it calls Event::duration, whose device specializations are not const
.
|
inline |
|
inline |
|
inline |