"lastTime" wasn't updated correctly when the thread was unscheduled.

"scheduler" would therefore print incorrect latencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28254 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-10-20 23:12:06 +00:00
parent 768036bb6e
commit 1d1eb06e15
@@ -193,8 +193,6 @@ cmd_scheduler(int argc, char** argv)
if (state == STILL_RUNNING) {
// thread preempted
state = PREEMPTED;
runs++;
preemptions++;
totalRunTime += diffTime;
@@ -202,6 +200,9 @@ cmd_scheduler(int argc, char** argv)
minRunTime = diffTime;
if (diffTime > maxRunTime)
maxRunTime = diffTime;
state = PREEMPTED;
lastTime = entry->Time();
} else if (state == RUNNING) {
// thread starts waiting (it hadn't been added to the run
// queue before being unscheduled)
@@ -214,6 +215,7 @@ cmd_scheduler(int argc, char** argv)
maxRunTime = diffTime;
state = WAITING;
lastTime = entry->Time();
}
}
} else if (EnqueueThread* entry