PIVX Core  5.6.99
P2P Digital Currency
Functions
utiltime.cpp File Reference
#include "tinyformat.h"
#include "utiltime.h"
#include <atomic>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread.hpp>
#include <ctime>
#include <thread>
Include dependency graph for utiltime.cpp:

Go to the source code of this file.

Functions

void UninterruptibleSleep (const std::chrono::microseconds &n)
 
int64_t GetTime ()
 DEPRECATED Use either GetSystemTimeInSeconds (not mockable) or GetTime<T> (mockable) More...
 
void SetMockTime (int64_t nMockTimeIn)
 For testing. More...
 
int64_t GetMockTime ()
 For testing. More...
 
int64_t GetTimeMillis ()
 Returns the system time (not mockable) More...
 
int64_t GetSystemTimeInSeconds ()
 Returns the system time (not mockable) More...
 
int64_t GetTimeMicros ()
 Returns the system time (not mockable) More...
 
void MilliSleep (int64_t n)
 
std::string DurationToDHMS (int64_t nDurationTime)
 
std::string FormatISO8601DateTime (int64_t nTime)
 ISO 8601 formatting is preferred. More...
 
std::string FormatISO8601DateTimeForBackup (int64_t nTime)
 
std::string FormatISO8601Date (int64_t nTime)
 
std::string FormatISO8601Time (int64_t nTime)
 

Function Documentation

◆ DurationToDHMS()

std::string DurationToDHMS ( int64_t  nDurationTime)

Definition at line 87 of file utiltime.cpp.

◆ FormatISO8601Date()

std::string FormatISO8601Date ( int64_t  nTime)

Definition at line 128 of file utiltime.cpp.

Here is the caller graph for this function:

◆ FormatISO8601DateTime()

std::string FormatISO8601DateTime ( int64_t  nTime)

ISO 8601 formatting is preferred.

Use the FormatISO8601{DateTime,Date,Time} helper functions if possible.

Definition at line 102 of file utiltime.cpp.

Here is the caller graph for this function:

◆ FormatISO8601DateTimeForBackup()

std::string FormatISO8601DateTimeForBackup ( int64_t  nTime)

Definition at line 115 of file utiltime.cpp.

Here is the caller graph for this function:

◆ FormatISO8601Time()

std::string FormatISO8601Time ( int64_t  nTime)

Definition at line 141 of file utiltime.cpp.

Here is the caller graph for this function:

◆ GetMockTime()

int64_t GetMockTime ( )

For testing.

Definition at line 56 of file utiltime.cpp.

Here is the caller graph for this function:

◆ GetSystemTimeInSeconds()

int64_t GetSystemTimeInSeconds ( )

Returns the system time (not mockable)

Definition at line 69 of file utiltime.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTime()

template std::chrono::microseconds GetTime ( )

DEPRECATED Use either GetSystemTimeInSeconds (not mockable) or GetTime<T> (mockable)

Return system time (or mocked time, if set)

Definition at line 27 of file utiltime.cpp.

Here is the caller graph for this function:

◆ GetTimeMicros()

int64_t GetTimeMicros ( )

Returns the system time (not mockable)

Definition at line 74 of file utiltime.cpp.

Here is the caller graph for this function:

◆ GetTimeMillis()

int64_t GetTimeMillis ( )

Returns the system time (not mockable)

Definition at line 61 of file utiltime.cpp.

Here is the caller graph for this function:

◆ MilliSleep()

void MilliSleep ( int64_t  n)

Definition at line 82 of file utiltime.cpp.

Here is the caller graph for this function:

◆ SetMockTime()

void SetMockTime ( int64_t  nMockTimeIn)

For testing.

Set e.g. with the setmocktime rpc, or -mocktime argument

Definition at line 51 of file utiltime.cpp.

Here is the caller graph for this function:

◆ UninterruptibleSleep()

void UninterruptibleSleep ( const std::chrono::microseconds &  n)

Definition at line 22 of file utiltime.cpp.