Which library are microtime functions hiding in?
Robert Watson
rwatson at FreeBSD.org
Tue May 26 16:32:13 UTC 2009
On Tue, 26 May 2009, nocturnal wrote:
> I haven't used the microtime, nanotime functions in a long time but i don't
> remember them being in any other library than libc.
>
> Obviously i can't find them there and the manual doesn't have a LIBRARY
> section or list which library they're in.
>
> So where are they?!
>
> I'm using FreeBSD 7.2-RELEASE.
Hi--
You likely have in mind the microtime(9) functions -- section 9 of the man
page is actually for kernel macros and functions, and they are generally
available only to code running in the kernel, or in a module loaded into the
kernel.
The closest userspace functions are clock_gettime(2) and related calls, which
allow you to query real time, uptime, etc. These are available as part of
libc.
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-current
mailing list