fix BStopWatch::Resume()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14204 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2005-09-20 11:34:22 +00:00
parent 534bc2c360
commit b6389f3106
1 changed files with 5 additions and 2 deletions

View File

@ -71,8 +71,10 @@ BStopWatch::Suspend()
void
BStopWatch::Resume()
{
if (fSuspendTime)
fStart = system_time() - fSuspendTime - fStart;
if (fSuspendTime) {
fStart += system_time() - fSuspendTime;
fSuspendTime = 0;
}
}
@ -121,3 +123,4 @@ BStopWatch::Name() const
// just for future binary compatibility
void BStopWatch::_ReservedStopWatch1() {}
void BStopWatch::_ReservedStopWatch2() {}