[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#630570: worklog: Worklog uses a bit too much cpu



Package: worklog
Version: 1.8-4
Severity: wishlist
Tags: patch

Worklog wakes up 1000 times per second to check for a keypress and update the time.

That's excessive and causes increased power consumption for a laptop.

The fix is very simple:

In the line:

          for(keypress=ERR;keypress==ERR;usleep(1000))

Change the usleep to 100000 making it wake up 10 times per second which is sufficient.

-- System Information:
Debian Release: 5.0.8
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages worklog depends on:
ii  libc6                     2.11.2-6       Embedded GNU C Library: Shared lib
ii  libncurses5               5.7+20100313-2 shared libraries for terminal hand

worklog recommends no packages.

worklog suggests no packages.

-- no debconf information



Reply to: