BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
utiltime.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 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 void SetMockTime(int64_t nMockTimeIn);
27 int64_t GetMockTime();
28 void MilliSleep(int64_t n);
29 
34 std::string FormatISO8601DateTime(int64_t nTime);
35 std::string FormatISO8601Date(int64_t nTime);
36 std::string FormatISO8601Time(int64_t nTime);
37 
38 #endif // BITCOIN_UTILTIME_H
int64_t GetTime()
GetTimeMicros() and GetTimeMillis() both return the system time, but in different units...
Definition: utiltime.cpp:20
std::string FormatISO8601DateTime(int64_t nTime)
ISO 8601 formatting is preferred.
Definition: utiltime.cpp:79
void SetMockTime(int64_t nMockTimeIn)
Definition: utiltime.cpp:30
void MilliSleep(int64_t n)
Definition: utiltime.cpp:61
int64_t GetMockTime()
Definition: utiltime.cpp:35
std::string FormatISO8601Time(int64_t nTime)
Definition: utiltime.cpp:101
std::string FormatISO8601Date(int64_t nTime)
Definition: utiltime.cpp:90
int64_t GetTimeMillis()
Definition: utiltime.cpp:40
int64_t GetTimeMicros()
Definition: utiltime.cpp:48
int64_t GetSystemTimeInSeconds()
Definition: utiltime.cpp:56