blob: ce99982b74179566d108d6c89575cdeb196b13f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include <chrono>
#include <cstdint>
#include <utility>
#include <ctime>
//NOLINTNEXTLINE
namespace Time {
using steady_tp = std::chrono::steady_clock::time_point;
using system_tp = std::chrono::system_clock::time_point;
using steady_dur = std::chrono::steady_clock::duration;
using system_dur = std::chrono::system_clock::duration;
steady_tp steadyNow();
system_tp systemNow();
steady_tp fromTimespec(const timespec*);
struct timespec toTimespec(const steady_tp& tp);
steady_dur till(const timespec& ts);
uint64_t millis(const steady_tp& tp);
uint64_t millis(const system_tp& tp);
std::pair<uint64_t, uint64_t> secNsec(const steady_tp& tp);
std::pair<uint64_t, uint64_t> secNsec(const system_tp& tp);
};
|