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>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-851401618-1201008855=:4862
Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Tue, 22 Jan 2008, Dag-Erling Sm=C3=B8rgrav wrote:

> Dag-Erling Sm=C3=B8rgrav <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...

--=20
DE
---559023410-851401618-1201008855=:4862--



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