Bug 204862
Summary: | clock applet updates every second even when seconds aren't showing | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Arjan van de Ven <arjan> | ||||||
Component: | gnome-panel | Assignee: | Ray Strode [halfline] <rstrode> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | ||||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-09-01 18:22:15 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 204948 | ||||||||
Attachments: |
|
Description
Arjan van de Ven
2006-08-31 22:21:54 UTC
Created attachment 135345 [details]
patch to poll less frequent when not showing seconds
ok that patch was a fugly hack; this one is nicer: Instead of doing a repeating constant timer, calculate the time to the next redraw event and just make the timer not rearm. This has 2 advantages 1) it is more accurate; the old clock was only second accurate, the new clock is much more accurate 2) there are no spurious timer wake events at all, the only wake events that happen have real work to do strace of the new clock to show how nice it works: 9:26:23.634270 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}], 10, 36366) = 0 09:27:00.000822 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1074, ...}) = 0 09:27:00.001303 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1074, ...}) = 0 09:27:00.001485 ioctl(3, FIONREAD, [0]) = 0 09:27:00.001581 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}], 10, 0) = 0 09:27:00.001998 write(3, "5\20\4\0@\0\200\1!\0\200\1=\0\30\0\231\4\5\0A\0\200\1@"..., 652) = 652 09:27:00.002103 ioctl(3, FIONREAD, [0]) = 0 09:27:00.002170 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}], 10, 59999) = 0 09:28:00.001798 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1074, ...}) = 0 09:28:00.002202 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1074, ...}) = 0 notice how all the procesing happens exactly in the first few microseconds of the new minute Created attachment 135362 [details]
patch to make the clock applet wakeup event be at exactly the right time for redrawing rather than polling for it
Fixed in 2.15.92-6.fc6 |