diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-06 22:43:39 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-06 22:43:39 +0100 |
commit | 5e3b14069e3fe25ec2595124e6e0103c7be4f813 (patch) | |
tree | d818305a88168d4aff500e2dc9a5fb590763375a /util-linux/rtcwake.c | |
parent | 695fa51c80047eb25cc82e6e1630b4545a6bc0b6 (diff) | |
download | busybox-w32-5e3b14069e3fe25ec2595124e6e0103c7be4f813.tar.gz busybox-w32-5e3b14069e3fe25ec2595124e6e0103c7be4f813.tar.bz2 busybox-w32-5e3b14069e3fe25ec2595124e6e0103c7be4f813.zip |
hwclock: make it report system/rtc clock difference
function old new delta
rtc_tm2time - 89 +89
read_rtc 23 86 +63
rtc_read_tm - 49 +49
hwclock_main 428 466 +38
rtcwake_main 453 477 +24
rtc_read_time 142 - -142
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 3/0 up/down: 263/-142) Total: 121 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/rtcwake.c')
-rw-r--r-- | util-linux/rtcwake.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index 049f699f5..64c3e7ed7 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -160,7 +160,12 @@ int rtcwake_main(int argc UNUSED_PARAM, char **argv) | |||
160 | 160 | ||
161 | /* relative or absolute alarm time, normalized to time_t */ | 161 | /* relative or absolute alarm time, normalized to time_t */ |
162 | sys_time = time(NULL); | 162 | sys_time = time(NULL); |
163 | rtc_time = rtc_read_time(fd, utc); | 163 | { |
164 | struct tm tm; | ||
165 | rtc_read_tm(&tm, fd); | ||
166 | rtc_time = rtc_tm2time(&tm, utc); | ||
167 | } | ||
168 | |||
164 | 169 | ||
165 | if (alarm_time) { | 170 | if (alarm_time) { |
166 | if (alarm_time < sys_time) | 171 | if (alarm_time < sys_time) |