diff options
| author | Suhas Daftuar <[email protected]> | 2015-10-23 13:07:36 -0400 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2015-10-26 15:05:37 -0400 |
| commit | 7bbc7c314f4ebb1e7fe882a0a2aae5a5655f2972 (patch) | |
| tree | 962a5af7cb1251b5166915474c80d4b54277fc52 /src/utiltime.cpp | |
| parent | Merge pull request #6820 (diff) | |
| download | discoin-7bbc7c314f4ebb1e7fe882a0a2aae5a5655f2972.tar.xz discoin-7bbc7c314f4ebb1e7fe882a0a2aae5a5655f2972.zip | |
Add option for microsecond precision in debug.log
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) { |