aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-12-12 09:14:52 -0800
committerGavin Andresen <gavinandresen@gmail.com>2012-12-12 09:14:52 -0800
commit043a8fb98df03c458bb0b4c119418fd23b59f2bc (patch)
tree9b8671a7c58819cb93c8c554cb3a98477f730e71 /src/util.h
parentdbd5bb803938f0030902b040e7ae191fc75d69b5 (diff)
parent8a28bb6deee2df7dac3288c1bc6db6221e5e43b6 (diff)
Merge pull request #2059 from sipa/benchmark
Add -benchmark for reporting block processing times
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index d8203b58ee..ab921e6f05 100644
--- a/src/util.h
+++ b/src/util.h
@@ -330,6 +330,12 @@ inline int64 GetTimeMillis()
boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
}
+inline int64 GetTimeMicros()
+{
+ return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
+ boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
+}
+
inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime)
{
time_t n = nTime;