aboutsummaryrefslogtreecommitdiff
path: root/src/utiltime.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-10-23 13:07:36 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2015-10-26 15:05:37 -0400
commit7bbc7c314f4ebb1e7fe882a0a2aae5a5655f2972 (patch)
tree962a5af7cb1251b5166915474c80d4b54277fc52 /src/utiltime.cpp
parentd78a880900c15c7a28ae81e6632090f25fea7fce (diff)
Add option for microsecond precision in debug.log
Diffstat (limited to 'src/utiltime.cpp')
-rw-r--r--src/utiltime.cpp8
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)
{