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:44
::uint32_t uint32_t
Definition: Meta.h:56
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
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18
raw_ostream & operator<<(raw_ostream &OS, sys::TimePoint<> TP)