File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
meta/include/gnuradio-4.0/meta Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 23
23
24
24
namespace gr {
25
25
namespace time {
26
- [[nodiscard]] inline std::string getIsoTime (std::chrono::system_clock::time_point timePoint = std::chrono::system_clock::now()) noexcept {
26
+ template <typename Clock, typename Duration>
27
+ [[nodiscard]] inline std::string getIsoTime (std::chrono::time_point<Clock, Duration> timePoint) noexcept {
27
28
const auto secs = std::chrono::time_point_cast<std::chrono::seconds>(timePoint);
28
29
const auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(timePoint - secs).count ();
29
30
return std::format (" {:%Y-%m-%dT%H:%M:%S}.{:06}" , secs, ms); // ms-precision ISO time-format
30
31
}
32
+
33
+ [[nodiscard]] inline std::string getIsoTime () noexcept { return getIsoTime (std::chrono::system_clock::now ()); }
31
34
} // namespace time
32
35
33
36
#ifndef STD_FORMATTER_RANGES
You can’t perform that action at this time.
0 commit comments