diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-12 12:52:30 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-12 12:52:30 +0100 |
commit | f2c8aa6676ebedc34b2cd5089ce6f13c16db1277 (patch) | |
tree | bc728f22666ee367d1c6c085a6cf65570881636c /miscutils | |
parent | cb23d93c6845df3f2733a32caa4194e60ef871a7 (diff) | |
download | busybox-w32-f2c8aa6676ebedc34b2cd5089ce6f13c16db1277.tar.gz busybox-w32-f2c8aa6676ebedc34b2cd5089ce6f13c16db1277.tar.bz2 busybox-w32-f2c8aa6676ebedc34b2cd5089ce6f13c16db1277.zip |
libbb: introduce and use monotonic_ms
function old new delta
monotonic_ms - 60 +60
process_stdin 433 443 +10
display_speed 85 90 +5
nmeter_main 672 674 +2
builtin_type 114 116 +2
bb__parsespent 117 119 +2
ifplugd_main 1110 1109 -1
acpid_main 441 440 -1
chat_main 1361 1359 -2
doCommands 2458 2449 -9
arpping 466 450 -16
run_command 268 234 -34
readcmd 1072 1034 -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101) Total: -20 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/time.c b/miscutils/time.c index 342173609..5ea0f064b 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -70,7 +70,7 @@ static void resuse_end(pid_t pid, resource_t *resp) | |||
70 | return; | 70 | return; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | resp->elapsed_ms = (monotonic_us() / 1000) - resp->elapsed_ms; | 73 | resp->elapsed_ms = monotonic_ms() - resp->elapsed_ms; |
74 | } | 74 | } |
75 | 75 | ||
76 | static void printargv(char *const *argv) | 76 | static void printargv(char *const *argv) |
@@ -371,7 +371,7 @@ static void run_command(char *const *cmd, resource_t *resp) | |||
371 | void (*interrupt_signal)(int); | 371 | void (*interrupt_signal)(int); |
372 | void (*quit_signal)(int); | 372 | void (*quit_signal)(int); |
373 | 373 | ||
374 | resp->elapsed_ms = monotonic_us() / 1000; | 374 | resp->elapsed_ms = monotonic_ms(); |
375 | pid = vfork(); /* Run CMD as child process. */ | 375 | pid = vfork(); /* Run CMD as child process. */ |
376 | if (pid < 0) | 376 | if (pid < 0) |
377 | bb_perror_msg_and_die("fork"); | 377 | bb_perror_msg_and_die("fork"); |