From owner-freebsd-current@FreeBSD.ORG Tue May 26 16:32:12 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51F5B10656BB for ; Tue, 26 May 2009 16:32:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2D20C8FC08 for ; Tue, 26 May 2009 16:32:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id A579946B45; Tue, 26 May 2009 12:32:11 -0400 (EDT) Date: Tue, 26 May 2009 17:32:11 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: nocturnal In-Reply-To: <9aed80930905260655m2c6baf0by2d1ae6327b2fa5fb@mail.gmail.com> Message-ID: References: <9aed80930905260655m2c6baf0by2d1ae6327b2fa5fb@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: Which library are microtime functions hiding in? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 16:32:13 -0000 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