diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 08:58:38 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 08:58:38 +0000 |
commit | da23c8c5a188324455c8f417293c10d85f65cb63 (patch) | |
tree | d7a4b8cb0af705de6650e20e00ba3da04d84b27f /ClockMeter.c | |
parent | 12f4f09e6ed288bdedc86e4ef22f3cc34f0e787a (diff) |
Clean up headers by using 'static' whenever possible.
Reduces resulting code size.
Diffstat (limited to 'ClockMeter.c')
-rw-r--r-- | ClockMeter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ClockMeter.c b/ClockMeter.c index 847a09b1..8d42b24b 100644 --- a/ClockMeter.c +++ b/ClockMeter.c @@ -16,6 +16,13 @@ int ClockMeter_attributes[] = { CLOCK }; +static void ClockMeter_setValues(Meter* this, char* buffer, int size) { + time_t t = time(NULL); + struct tm *lt = localtime(&t); + this->values[0] = lt->tm_hour * 60 + lt->tm_min; + strftime(buffer, size, "%H:%M:%S", lt); +} + MeterType ClockMeter = { .setValues = ClockMeter_setValues, .display = NULL, @@ -27,10 +34,3 @@ MeterType ClockMeter = { .uiName = "Clock", .caption = "Time: ", }; - -void ClockMeter_setValues(Meter* this, char* buffer, int size) { - time_t t = time(NULL); - struct tm *lt = localtime(&t); - this->values[0] = lt->tm_hour * 60 + lt->tm_min; - strftime(buffer, size, "%H:%M:%S", lt); -} |