9#ifndef WPIUTIL_WPI_CHRONO_H
10#define WPIUTIL_WPI_CHRONO_H
32template <
typename D = std::chrono::nanoseconds>
33using TimePoint = std::chrono::time_point<std::chrono::system_clock, D>;
37 using namespace std::chrono;
38 return system_clock::to_time_t(
39 time_point_cast<system_clock::time_point::duration>(TP));
43inline TimePoint<std::chrono::seconds>
45 using namespace std::chrono;
46 return time_point_cast<seconds>(system_clock::from_time_t(T));
52 using namespace std::chrono;
53 return time_point_cast<nanoseconds>(system_clock::from_time_t(T))
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:43
std::chrono::time_point< std::chrono::system_clock, D > TimePoint
A time point on the system clock.
Definition: Chrono.h:33
TimePoint< std::chrono::seconds > toTimePoint(std::time_t T)
Convert a std::time_t to a TimePoint.
Definition: Chrono.h:44
std::time_t toTimeT(TimePoint<> TP)
Convert a TimePoint to std::time_t.
Definition: Chrono.h:36
Definition: ntcore_cpp.h:26
std::enable_if_t<!std::is_reference_v< OStream > &&std::is_base_of_v< raw_ostream, OStream >, OStream && > operator<<(OStream &&OS, const T &Value)
Call the appropriate insertion operator, given an rvalue reference to a raw_ostream object and return...
Definition: raw_ostream.h:398