From owner-freebsd-hackers@FreeBSD.ORG Thu May 17 10:13:41 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 873531065670; Thu, 17 May 2012 10:13:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id E62608FC14; Thu, 17 May 2012 10:13:40 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4HADKe4029544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 May 2012 20:13:22 +1000 Date: Thu, 17 May 2012 20:13:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jason Hellenthal In-Reply-To: <20120517035441.GA91666@DataIX.net> Message-ID: <20120517195950.V1317@besplex.bde.org> References: <4FB41523.2000106@brandonfa.lk> <4FB457EC.20908@gmail.com> <20120517035441.GA91666@DataIX.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Thu, 17 May 2012 11:16:23 +0000 Cc: Bruce Evans , hackers@freebsd.org, davidxu@freebsd.org, Brandon Falk Subject: Re: High-res Timers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 10:13:41 -0000 On Wed, 16 May 2012, Jason Hellenthal wrote: >>>> Does anyone have a quick list of high-resolution timer functions? Both >>>> user-land and kernel-land? It would be greatly appreciated (doing some >>>> performance timing for applications). > > clocks(7) - various system timers > getitimer(2), setitimer(2) - get/set value of interval timer > > see ( man -k timer ) list for some other references. I think the original poster wants timestamping functions. "Timer function" normally means a timer-interrupt-scheduling function. clocks(7) is bogus and more than 10 years out of date. It is mostly about hardware and virtual clock oscillators that may be used to build timestamping and timer functions (mostly the former). > I am not sure what sort of high resolution you are refering to but maybe > these will lead you in the right direction. Bruce Evans CCd - he may > have quite a bit that could be added to this. I always find what he has > to say very enlightening. Generally, some of the timestamping functions have high resolution, but are too slow to use if you make a lot of timestamps, and if you don't make a lot of timestamps then you don't need very high resolution. Bruce