ArchHooks::GetMicrosecondsSinceStart
This commit is contained in:
@@ -135,7 +135,7 @@ void ArchHooks_Unix::SetTime( tm newtime )
|
||||
system( "hwclock --systohc" );
|
||||
}
|
||||
|
||||
int64_t ArchHooks_Unix::GetMicrosecondsSinceStart()
|
||||
static int64_t GetMicrosecondsSinceEpoch()
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday( &tv, NULL );
|
||||
@@ -143,6 +143,12 @@ int64_t ArchHooks_Unix::GetMicrosecondsSinceStart()
|
||||
return int64_t(tv.tv_sec) * 1000000 + int64_t(tv.tv_usec);
|
||||
}
|
||||
|
||||
int64_t ArchHooks::GetMicrosecondsSinceStart( bool bAccurate )
|
||||
{
|
||||
static int64_t iStartTime = GetMicrosecondsSinceEpoch();
|
||||
return GetMicrosecondsSinceEpoch() - iStartTime;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user