[ icewm-Patches-3085192 ] [PATCH] configurable clock update interval to reduce wakeups
"SourceForge.net" <[email protected]> Mon, 11 Oct 2010 11:33:18 +0000
| Newsgroups | gmane.comp.window-managers.icewm.devel |
|---|---|
| Message-ID | <[email protected]> |
Patches item #3085192, was opened at 2010-10-11 11:33 Message generated for change (Tracker Item Submitted) made by lindi2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300031&aid=3085192&group_id=31 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: another bloating feature Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Timo Lindfors (lindi2) Assigned to: Nobody/Anonymous (nobody) Summary: [PATCH] configurable clock update interval to reduce wakeups Initial Comment: [Patch also attached] >From 4617021c95e5ddc1fdb15a39a412f65a02fe3f41 Mon Sep 17 00:00:00 2001 From: Timo Juhani Lindfors <[email protected]> Date: Mon, 11 Oct 2010 14:28:08 +0300 Subject: [PATCH] Add new option TaskBarClockUpdateInterval for reducing wakeups from idle Currently icewm wakes up every second to update the clock even if it only shows hours and minutes. Detecting if %S is used is hard. This patch implements an option that lets the user to manually specify how often he wants the clock to update itself. Future improvement would of course be to synchronize this to real time somehow. --- src/aclock.cc | 2 +- src/default.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/aclock.cc b/src/aclock.cc index 1cf2f7b..b4a2888 100644 --- a/src/aclock.cc +++ b/src/aclock.cc @@ -57,7 +57,7 @@ YClock::YClock(YWindow *aParent): YWindow(aParent) { toolTipUTC = false; transparent = -1; - clockTimer = new YTimer(1000); + clockTimer = new YTimer(taskBarClockUpdateInterval); clockTimer->setTimerListener(this); clockTimer->startTimer(); autoSize(); diff --git a/src/default.h b/src/default.h index 2951b46..5a83523 100644 --- a/src/default.h +++ b/src/default.h @@ -175,6 +175,7 @@ XSV(const char *, logoutCancelCommand, 0) XSV(const char *, shutdownCommand, 0) XSV(const char *, rebootCommand, 0) XIV(int, taskBarCPUDelay, 500) +XIV(int, taskBarClockUpdateInterval, 1000) XIV(int, taskBarNetSamples, 20) XIV(int, taskBarNetDelay, 500) XSV(const char *, cpuCommand, "x-terminal-emulator -name top -title Process\\ Status -e top") @@ -365,6 +366,7 @@ cfoption icewm_preferences[] = { #ifdef CONFIG_TASKBAR OIV("TaskBarCPUSamples", &taskBarCPUSamples, 2, 1000, "Width of CPU Monitor"), OIV("TaskBarCPUDelay", &taskBarCPUDelay, 10, (60*60*1000), "Delay between CPU Monitor samples in ms"), + OIV("TaskBarClockUpdateInterval", &taskBarClockUpdateInterval, 10, (60*60*1000), "Clock update interval in ms"), OIV("TaskBarNetSamples", &taskBarNetSamples, 2, 1000, "Width of Net Monitor"), OIV("TaskBarNetDelay", &taskBarNetDelay, 10, (60*60*1000), "Delay between Net Monitor samples in ms"), OIV("TaskbarButtonWidthDivisor", &taskBarButtonWidthDivisor, 1, 25, "default number of tasks in taskbar"), -- 1.7.1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300031&aid=3085192&group_id=31 ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb