Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2008 08:34:15 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
Cc:        freebsd-hackers@freebsd.org, Stefan Lambrev <stefan.lambrev@moneybookers.com>
Subject:   Re: gettimeofday() in hping
Message-ID:  <Pine.GSO.4.64.0801220831360.4862@sea.ntplx.net>
In-Reply-To: <864pd63v2h.fsf@ds4.des.no>
References:  <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no>

index | next in thread | previous in thread | raw e-mail

On Tue, 22 Jan 2008, Dag-Erling Smørgrav wrote:

> Dag-Erling Smørgrav <des@des.no> writes:
>> Stefan Lambrev <stefan.lambrev@moneybookers.com> writes:
>>> I tried clock_gettime() (using CLOCK_REALTIME for clock_id), but this
>>> yield worse performance.
>> Try CLOCK_MONOTONIC instead.
>
> I forgot - there are also the FreeBSD-specific CLOCK_REALTIME_FAST and
> CLOCK_MONOTONIC_FAST if you can live with a little bit of jitter.

Not to discount any of your suggestions, but isn't the better
performance of gettimeofday() (and perhaps clock_gettime() also)
in Linux because they have access to the time in userland and
can implement it without a system call?  I seem to recall this
being mentioned before, I could be wrong...

-- 
DE
home | help

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