From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 18:34:17 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59648106566B for ; Wed, 26 Mar 2008 18:34:17 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.176]) by mx1.freebsd.org (Postfix) with ESMTP id 0571A8FC23 for ; Wed, 26 Mar 2008 18:34:15 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: by el-out-1112.google.com with SMTP id v27so2097700ele.12 for ; Wed, 26 Mar 2008 11:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=+lLkkmnaA7WeENC5CZrUoKbYt4Kn0feE2yRXQM/4vjg=; b=qVtiwFLAkAQHi07DS9HW55N96OIh176H/rDHdlsBPOy1R+bQvHg3ZAv1vjagCDY2fWTyAM2h/Kvb0cshmfAJPg+VlGF9YMTPsYPS5cXT6rDN4zTrvwPq/UFOjMlhbbyILK2Z/SOojMA6i0nQAYIe72ZW31ImmjguasXh5Nlyook= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=op2o3R9c5rKNSk6hmTYX72EIehsI2OVPDCJoBGv4Tgn+ANA52aRxzfzWywyiTIVizdon/akzlm5p4HIR0ytSFivQbjGeuGMCdjs4uAIUdTe22sD64CAuXKqrNKIJAzELsMzrD5a0Q38S8RcgbFyBTtcsWyg09ixAz9SEL95tVsk= Received: by 10.140.163.3 with SMTP id l3mr353260rve.68.1206556454698; Wed, 26 Mar 2008 11:34:14 -0700 (PDT) Received: by 10.140.157.7 with HTTP; Wed, 26 Mar 2008 11:34:14 -0700 (PDT) Message-ID: <340a29540803261134y372d7be5k6d3c880fe320a3fe@mail.gmail.com> Date: Wed, 26 Mar 2008 12:34:14 -0600 From: "Andrew Falanga" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: High resolution timing in FreeBSD for program code X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2008 18:34:17 -0000 Hi, What available functions in FreeBSD would be good for finer-than-microsecond detail for timing of code execution? Some searches on the NG comp.unix.programmer turned up clock_gettime(), which I see FreeBSD does support. However, I was wondering if there might be something better or used more often. Secondly, I was wondering if anyone here knows what this function, clock_gettime(), uses for it's timing? Thanks, Andy -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?