Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

utiltime.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2019 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_UTILTIME_H
7 #define BITCOIN_UTILTIME_H
8 
9 #include <stdint.h>
10 #include <string>
11 #include <chrono>
12 
17 int64_t GetTime();
18 
20 int64_t GetTimeMillis();
22 int64_t GetTimeMicros();
24 int64_t GetSystemTimeInSeconds(); // Like GetTime(), but not mockable
25 
27 void SetMockTime(int64_t nMockTimeIn);
29 int64_t GetMockTime();
30 
31 void MilliSleep(int64_t n);
32 
34 template <typename T>
35 T GetTime();
36 
37 std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
38 
39 #endif // BITCOIN_UTILTIME_H
int64_t GetTime()
DEPRECATED Use either GetSystemTimeInSeconds (not mockable) or GetTime<T> (mockable) ...
Definition: utiltime.cpp:22
void SetMockTime(int64_t nMockTimeIn)
For testing.
Definition: utiltime.cpp:46
void MilliSleep(int64_t n)
Definition: utiltime.cpp:75
std::string DateTimeStrFormat(const char *pszFormat, int64_t nTime)
Definition: utiltime.cpp:93
int64_t GetMockTime()
For testing.
Definition: utiltime.cpp:51
int64_t GetTimeMillis()
Returns the system time (not mockable)
Definition: utiltime.cpp:56
int64_t GetTimeMicros()
Returns the system time (not mockable)
Definition: utiltime.cpp:63
int64_t GetSystemTimeInSeconds()
Returns the system time (not mockable)
Definition: utiltime.cpp:70
Released under the MIT license