Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 06:52:20 +0400
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 06:52:20 +0400
commitdefc1ea34074e7882724c460260d307cdf981a70 (patch)
treefca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/time.c
parent26bc57d8b26425f23f4be974cce7bf35c95c9a1a (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.c8
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);
}