diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2014-06-22 16:01:13 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-22 16:01:13 +0400 |
commit | 5d2e409ef8224dc32fde59702e8ec90b231441ed (patch) | |
tree | 1d73d4a99a495ba57bc5be8878dce3cefbb99e9f /libbb | |
parent | f92f1d0181853b989f9377debb56902e3e21c9a8 (diff) |
libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytes
function old new delta
bb_sc_clk_tck - 10 +10
timescmd 118 113 -5
print_route 1763 1758 -5
mpstat_main 1288 1283 -5
iostat_main 1947 1942 -5
INET_setroute 879 871 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/sysconf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/sysconf.c b/libbb/sysconf.c index c5fa5e001..4dbffbebd 100644 --- a/libbb/sysconf.c +++ b/libbb/sysconf.c @@ -14,3 +14,9 @@ unsigned FAST_FUNC bb_arg_max(void) return sysconf(_SC_ARG_MAX); } #endif + +/* Return the number of clock ticks per second. */ +unsigned FAST_FUNC bb_clk_tck(void) +{ + return sysconf(_SC_CLK_TCK); +} |