Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2012 20:13:20 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Jason Hellenthal <jhellenthal@dataix.net>
Cc:        Bruce Evans <brde@optusnet.com.au>, hackers@freebsd.org, davidxu@freebsd.org, Brandon Falk <bfalk_bsd@brandonfa.lk>
Subject:   Re: High-res Timers
Message-ID:  <20120517195950.V1317@besplex.bde.org>
In-Reply-To: <20120517035441.GA91666@DataIX.net>
References:  <4FB41523.2000106@brandonfa.lk> <4FB457EC.20908@gmail.com> <CAGsORuAzvseHPB%2B9UuDj4BqS9CRmBt_n5h0fG2-6VQsD5H7drA@mail.gmail.com> <20120517035441.GA91666@DataIX.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120517195950.V1317>