From owner-freebsd-current@FreeBSD.ORG Fri Aug 15 08:47:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47C0037B433 for ; Fri, 15 Aug 2003 08:47:19 -0700 (PDT) Received: from garple.migus.org (pcp243676pcs.howard01.md.comcast.net [68.55.84.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F61B43FB1 for ; Fri, 15 Aug 2003 08:47:18 -0700 (PDT) (envelope-from adam@migus.org) Received: from garple.migus.org (localhost [127.0.0.1]) by garple.migus.org (8.12.9/8.12.9) with ESMTP id h7FFlG4f033411 for ; Fri, 15 Aug 2003 11:47:17 -0400 (EDT) (envelope-from adam@migus.org) Received: (from www@localhost) by garple.migus.org (8.12.9/8.12.9/Submit) id h7FFlGjV033410; Fri, 15 Aug 2003 11:47:16 -0400 (EDT) X-Authentication-Warning: garple.migus.org: www set sender to adam@migus.org using -f Received: from 192.168.4.2 (SquirrelMail authenticated user adam) by mail.migus.org with HTTP; Fri, 15 Aug 2003 11:47:16 -0400 (EDT) Message-ID: <55347.192.168.4.2.1060962436.squirrel@mail.migus.org> Date: Fri, 15 Aug 2003 11:47:16 -0400 (EDT) From: "Adam Migus" To: current@FreeBSD.org User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Status: No, hits=0.1 required=5.0 tests=PRIORITY_NO_NAME,USER_AGENT,X_AUTH_WARNING version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Mailman-Approved-At: Tue, 19 Aug 2003 10:58:39 -0700 Subject: date/time, standards n' stuff question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 15:47:21 -0000 Folks, First of all I'm not sure if this is the right list. If it isn't please accept my apologies and divert the thread to the right one so I'll know for future reference. I'm using the following little program to generate nano-second timestamps for performance testing: int main(int argc, char **argv) { struct timespec ts; if (clock_gettime(CLOCK_REALTIME, &ts) != 0) { perror("clock_gettime"); return (1); } printf("%d.%09lu\n", ts.tv_sec, ts.tv_nsec); return (0); } My question is would it be right/acceptable/agreeable to augment /usr/bin/date to include an option to generate nanosecond precision dates? I'm thinking this might make things icky with regards to standards, etc. but if it were an option and didn't affect the existing functionality would it really matter? Would anyone care? Does anyone like or object to the idea? My motivation for asking is simply to avoid having to distribute/use this program with the performance testing stuff as previously (before I cared about nano-second precision) I just used /usr/bin/date to generate the datestamps. -- Adam - Migus Dot Org (http://www.migus.org)