From defc1ea34074e7882724c460260d307cdf981a70 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 27 Jun 2008 02:52:20 +0000 Subject: *: 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 --- libbb/time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbb/time.c') 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); } -- cgit v1.2.3