Re: Which library are microtime functions hiding in?

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Tue, 26 May 2009 17:32:11 +0100 (BST)
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
Received on Tue May 26 2009 - 14:32:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:48 UTC