Dogecoin Core  1.14.2
P2P Digital Currency
utiltime.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 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 
22 int64_t GetTime();
23 int64_t GetTimeMillis();
24 int64_t GetTimeMicros();
25 int64_t GetSystemTimeInSeconds(); // Like GetTime(), but not mockable
26 int64_t GetLogTimeMicros();
27 void SetMockTime(int64_t nMockTimeIn);
28 void MilliSleep(int64_t n);
29 
30 std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
31 
32 #endif // BITCOIN_UTILTIME_H
int64_t GetTimeMicros()
Definition: utiltime.cpp:41
int64_t GetTimeMillis()
Definition: utiltime.cpp:33
int64_t GetSystemTimeInSeconds()
Definition: utiltime.cpp:49
int64_t GetTime()
GetTimeMicros() and GetTimeMillis() both return the system time, but in different units.
Definition: utiltime.cpp:19
int64_t GetLogTimeMicros()
Return a time useful for the debug log.
Definition: utiltime.cpp:55
std::string DateTimeStrFormat(const char *pszFormat, int64_t nTime)
Definition: utiltime.cpp:80
void SetMockTime(int64_t nMockTimeIn)
Definition: utiltime.cpp:28
void MilliSleep(int64_t n)
Definition: utiltime.cpp:62