ArchHooks::GetMicrosecondsSinceStart

This commit is contained in:
Glenn Maynard
2004-06-11 01:03:33 +00:00
parent 7aee50e5fd
commit 71797f7383
@@ -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.