#include <util/time.h>
#include <atomic>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <ctime>
#include <thread>
#include <tinyformat.h>
Go to the source code of this file.
◆ FormatISO8601Date()
std::string FormatISO8601Date |
( |
int64_t |
nTime | ) |
|
◆ FormatISO8601DateTime()
std::string FormatISO8601DateTime |
( |
int64_t |
nTime | ) |
|
ISO 8601 formatting is preferred.
Use the FormatISO8601{DateTime,Date} helper functions if possible.
Definition at line 78 of file time.cpp.
◆ GetMockTime()
For testing.
Definition at line 52 of file time.cpp.
◆ GetSystemTimeInSeconds()
int64_t GetSystemTimeInSeconds |
( |
| ) |
|
Returns the system time (not mockable)
Definition at line 73 of file time.cpp.
◆ GetTime()
Return system time (or mocked time, if set)
DEPRECATED Use either GetSystemTimeInSeconds (not mockable) or GetTime<T> (mockable)
Definition at line 23 of file time.cpp.
◆ GetTimeMicros()
int64_t GetTimeMicros |
( |
| ) |
|
Returns the system time (not mockable)
Definition at line 65 of file time.cpp.
◆ GetTimeMillis()
int64_t GetTimeMillis |
( |
| ) |
|
Returns the system time (not mockable)
Definition at line 57 of file time.cpp.
◆ nMockTime()
static std::atomic<int64_t> nMockTime |
( |
0 |
| ) |
|
|
static |
◆ ParseISO8601DateTime()
int64_t ParseISO8601DateTime |
( |
const std::string & |
str | ) |
|
◆ SetMockTime()
void SetMockTime |
( |
int64_t |
nMockTimeIn | ) |
|
For testing.
Set e.g. with the setmocktime rpc, or -mocktime argument
Definition at line 47 of file time.cpp.
◆ UninterruptibleSleep()
void UninterruptibleSleep |
( |
const std::chrono::microseconds & |
n | ) |
|