From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 14:03:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23E0F16A41A for ; Tue, 22 Jan 2008 14:03:35 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB8213C4EB for ; Tue, 22 Jan 2008 14:03:34 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m0MDYF6M005213; Tue, 22 Jan 2008 08:34:15 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Tue, 22 Jan 2008 08:34:16 -0500 (EST) Date: Tue, 22 Jan 2008 08:34:15 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <864pd63v2h.fsf@ds4.des.no> Message-ID: References: <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1201008855=:4862" Cc: freebsd-hackers@freebsd.org, Stefan Lambrev Subject: Re: gettimeofday() in hping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 14:03:35 -0000 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 writes: >> Stefan Lambrev 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--