25 namespace Timekeeper {
40 std::time_t t = std::chrono::system_clock::to_time_t(
m_tp);
41 std::string str = std::ctime(&t);
42 str[str.length() - 1] =
' ';
47 std::time_t
ToTimeT()
const {
return std::chrono::system_clock::to_time_t(
m_tp); }
50 std::chrono::system_clock::time_point
m_tp;
TimeStamp()
Constructor marks the time for the time stamp.
std::string ToString() const
Returns string with the time stamp after eliminating newline.
std::ostream & operator<<(std::ostream &oss, Stopwatch< T > const &stopwatch)
Insert accumulated time into output stream without altering stopwatch state.
std::time_t ToTimeT() const
Returns time stamp as a time_t.
std::chrono::system_clock::time_point m_tp
Provides wall-clock time stamp using the time call.