The Battle for Wesnoth  1.19.0-dev
Classes | Typedefs | Functions
util Namespace Reference


struct  optimer
 Reports time elapsed at the end of an object scope. More...


using ms_optimer = optimer< std::chrono::milliseconds >
 Time elapsed with millisecond resolution. More...


template<typename OpTimerType >
std::ostream & operator<< (std::ostream &o, const OpTimerType &tm)
 Formats time elapsed for writing to a stream. More...

Typedef Documentation

◆ ms_optimer

using util::ms_optimer = typedef optimer<std::chrono::milliseconds>

Time elapsed with millisecond resolution.

Definition at line 105 of file optimer.hpp.

Function Documentation

◆ operator<<()

template<typename OpTimerType >
std::ostream& util::operator<< ( std::ostream &  o,
const OpTimerType &  tm 

Formats time elapsed for writing to a stream.

The resulting output does not include a time unit suffix.

Definition at line 96 of file optimer.hpp.