diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-10-26 21:04:33 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-10-26 21:04:41 +0100 |
| commit | 2b625510d37471d4eaf5f99c2311afbdcae448c2 (patch) | |
| tree | 77cd9b5aaeefcd75409dab1811a7b6985744276b /src/utiltime.cpp | |
| parent | Merge pull request #6622 (diff) | |
| parent | Add option for microsecond precision in debug.log (diff) | |
| download | discoin-2b625510d37471d4eaf5f99c2311afbdcae448c2.tar.xz discoin-2b625510d37471d4eaf5f99c2311afbdcae448c2.zip | |
Merge pull request #6881
7bbc7c3 Add option for microsecond precision in debug.log (Suhas Daftuar)
Diffstat (limited to 'src/utiltime.cpp')
| -rw-r--r-- | src/utiltime.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utiltime.cpp b/src/utiltime.cpp index d31628899..3202c47f1 100644 --- a/src/utiltime.cpp +++ b/src/utiltime.cpp @@ -40,6 +40,14 @@ int64_t GetTimeMicros() boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds(); } +/** Return a time useful for the debug log */ +int64_t GetLogTimeMicros() +{ + if (nMockTime) return nMockTime*1000000; + + return GetTimeMicros(); +} + void MilliSleep(int64_t n) { |