summaryrefslogtreecommitdiff
path: root/libbb/time.c
diff options
context:
space:
mode:
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 07c0094..7d3ac91 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);
}