diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 06:52:20 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 06:52:20 +0400 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/time.c | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/time.c')
-rw-r--r-- | libbb/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/time.c b/libbb/time.c index 07c009417..7d3ac9183 100644 --- a/libbb/time.c +++ b/libbb/time.c @@ -20,14 +20,14 @@ /* libc has incredibly messy way of doing this, * typically requiring -lrt. We just skip all this mess */ -unsigned long long monotonic_us(void) +unsigned long long FAST_FUNC monotonic_us(void) { struct timespec ts; if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts)) bb_error_msg_and_die("clock_gettime(MONOTONIC) failed"); return ts.tv_sec * 1000000ULL + ts.tv_nsec/1000; } -unsigned monotonic_sec(void) +unsigned FAST_FUNC monotonic_sec(void) { struct timespec ts; if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts)) @@ -35,14 +35,14 @@ unsigned monotonic_sec(void) return ts.tv_sec; } #else -unsigned long long monotonic_us(void) +unsigned long long FAST_FUNC monotonic_us(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * 1000000ULL + tv.tv_usec; } -unsigned monotonic_sec(void) +unsigned FAST_FUNC monotonic_sec(void) { return time(NULL); } |