Re: 2.6.15:kernel/time.c: The Nanosecond and code duplication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Ulrich Windl" <[email protected]> writes:

> but there's no POSIX like syscall interface 
> (clock_getres, clock_gettime, clock_settime) yet.

% grep clock include/asm-x86_64/unistd.h 
#define __NR_clock_settime      227
__SYSCALL(__NR_clock_settime, sys_clock_settime)
#define __NR_clock_gettime      228
__SYSCALL(__NR_clock_gettime, sys_clock_gettime)
#define __NR_clock_getres       229
__SYSCALL(__NR_clock_getres, sys_clock_getres)
#define __NR_clock_nanosleep    230
__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)

Has been available for quite some time.

However the calls are currently slower than gettimeofday and also
don't use nanoseconds internally in all cases (depends on the architecture), 
but still microseconds.  But I'm not sure it matters that much
because the underlying timers are often not better than microseconds
anyways and with nanoseconds you start to time even the inherent system
call latency.



-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux