[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
uptime function
From: |
Usurpator |
Subject: |
uptime function |
Date: |
Sun, 19 Aug 2001 15:12:40 +0200 |
I'm working on a KDE toolbar applet showing the current system uptime. Am I
allowed to use code from the GNU uptime 2.0 program? I will off-course
mention the original authors. The program will be distributed as free
software under the GPL.
q
BTW: in uptime.c, print_uptime:
setlocale (LC_NUMERIC, "C");
res = sscanf (buf, "%lf", &upsecs);
setlocale (LC_NUMERIC, "");
if (res == 1)
uptime = (time_t) upsecs;
Why don't do this?:
setlocale (LC_NUMERIC, "C");
if (sscanf (buf, "%lf", &upsecs))
uptime = (time_t) upsecs;
setlocale (LC_NUMERIC, "");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- uptime function,
Usurpator <=