Fixed Clock::Get[*] still running when clock is paused
Former-commit-id: f2063a94251fc27da492d0d37bd42355125a1a24
This commit is contained in:
parent
8c7b8435f9
commit
2ea87a601a
|
|
@ -55,7 +55,11 @@ nzUInt64 NzClock::GetMicroseconds() const
|
|||
{
|
||||
NazaraLock(m_mutex);
|
||||
|
||||
return m_elapsedTime + (NzGetMicroseconds()-m_refTime);
|
||||
nzUInt64 elapsedMicroseconds = m_elapsedTime;
|
||||
if (!m_paused)
|
||||
elapsedMicroseconds += (NzGetMicroseconds() - m_refTime);
|
||||
|
||||
return elapsedMicroseconds;
|
||||
}
|
||||
|
||||
nzUInt64 NzClock::GetMilliseconds() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue