[Aptitude-svn-commit] r4155 - in branches/aptitude-0.3/aptitude: .
src/vscreen
Daniel Burrows
dburrows at costa.debian.org
Wed Sep 21 21:12:41 UTC 2005
Author: dburrows
Date: Wed Sep 21 21:12:38 2005
New Revision: 4155
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc
Log:
Fix the calculation of sleep times for the timeout thread so that it doesn't take 100% of the CPU time (major oops).
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Sep 21 21:12:38 2005
@@ -1,5 +1,12 @@
2005-09-21 Daniel Burrows <dburrows at debian.org>
+ * src/vscreen/vscreen.cc:
+
+ When determining how long the timeout thread should sleep,
+ return the absolute time that the next timeout will trigger at,
+ not the amount of time until that time (this results in the
+ timeout thread spinning forever).
+
* src/ui.cc, src/ui.h:
Trigger package_states_changed from apply_current_solution.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc Wed Sep 21 21:12:38 2005
@@ -472,8 +472,7 @@
(diff.tv_sec == mintime.tv_sec && diff.tv_usec < mintime.tv_usec))
{
found_one = true;
- mintime.tv_sec = diff.tv_sec;
- mintime.tv_usec = diff.tv_usec;
+ mintime = i->second.activate_time;
}
}
}
More information about the Aptitude-svn-commit
mailing list