mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-02-05 11:24:19 +00:00
Add GetTimeMicros() for ore accurate benchmarking
This commit is contained in:
parent
a485c1b69e
commit
0ae0712b1c
@ -330,6 +330,12 @@ inline int64 GetTimeMillis()
|
|||||||
boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
|
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)
|
inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime)
|
||||||
{
|
{
|
||||||
time_t n = nTime;
|
time_t n = nTime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user