6 #ifndef BITCOIN_UTIL_TIME_H
7 #define BITCOIN_UTIL_TIME_H
25 inline int64_t
count_seconds(std::chrono::seconds t) {
return t.count(); }
58 #endif // BITCOIN_UTIL_TIME_H
int64_t count_microseconds(std::chrono::microseconds t)
int64_t GetSystemTimeInSeconds()
Returns the system time (not mockable)
void UninterruptibleSleep(const std::chrono::microseconds &n)
int64_t count_seconds(std::chrono::seconds t)
Helper to count the seconds of a duration.
int64_t GetTime()
DEPRECATED Use either GetSystemTimeInSeconds (not mockable) or GetTime (mockable) ...
int64_t GetTimeMillis()
Returns the system time (not mockable)
int64_t GetMockTime()
For testing.
int64_t ParseISO8601DateTime(const std::string &str)
std::string FormatISO8601Date(int64_t nTime)
std::string FormatISO8601DateTime(int64_t nTime)
ISO 8601 formatting is preferred.
void SetMockTime(int64_t nMockTimeIn)
For testing.
int64_t GetTimeMicros()
Returns the system time (not mockable)