diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2015-10-23 13:07:36 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2015-10-26 15:05:37 -0400 |
commit | 7bbc7c314f4ebb1e7fe882a0a2aae5a5655f2972 (patch) | |
tree | 962a5af7cb1251b5166915474c80d4b54277fc52 /src/utiltime.cpp | |
parent | d78a880900c15c7a28ae81e6632090f25fea7fce (diff) |
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 d316288999..3202c47f1d 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) { |