Raven Core  3.0.0
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 // Copyright (c) 2017-2019 The Raven Core developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef RAVEN_UTILTIME_H
8 #define RAVEN_UTILTIME_H
9 
10 #include <stdint.h>
11 #include <string>
12 
23 int64_t GetTime();
24 int64_t GetTimeMillis();
25 int64_t GetTimeMicros();
26 int64_t GetSystemTimeInSeconds(); // Like GetTime(), but not mockable
27 void SetMockTime(int64_t nMockTimeIn);
28 int64_t GetMockTime();
29 void MilliSleep(int64_t n);
30 
31 std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
32 
33 #endif // RAVEN_UTILTIME_H
int64_t GetTime()
GetTimeMicros() and GetTimeMillis() both return the system time, but in different units...
Definition: utiltime.cpp:20
void SetMockTime(int64_t nMockTimeIn)
Definition: utiltime.cpp:30
void MilliSleep(int64_t n)
Definition: utiltime.cpp:61
std::string DateTimeStrFormat(const char *pszFormat, int64_t nTime)
Definition: utiltime.cpp:79
int64_t GetMockTime()
Definition: utiltime.cpp:35
int64_t GetTimeMillis()
Definition: utiltime.cpp:40
int64_t GetTimeMicros()
Definition: utiltime.cpp:48
int64_t GetSystemTimeInSeconds()
Definition: utiltime.cpp:56