From owner-freebsd-current@FreeBSD.ORG Mon Oct 17 22:23:00 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 083D3106566C for ; Mon, 17 Oct 2011 22:23:00 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id C0DE78FC14 for ; Mon, 17 Oct 2011 22:22:59 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 303B12A28D10; Tue, 18 Oct 2011 00:22:59 +0200 (CEST) Date: Tue, 18 Oct 2011 00:22:59 +0200 From: Ed Schouten To: Arnaud Lacombe Message-ID: <20111017222259.GA91943@hoeg.nl> References: <1318884099-6005-1-git-send-email-lacombar@gmail.com> <20111017221933.GZ91943@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jlu4pbQiFVtq/4uk" Content-Disposition: inline In-Reply-To: <20111017221933.GZ91943@hoeg.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Current Subject: Re: [PATCH] Prepend timestamp in msgbuf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 17 Oct 2011 22:23:00 -0000 --jlu4pbQiFVtq/4uk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ah, missed something. > + getnanouptime(&ts); > + err =3D snprintf(buf, sizeof buf, "[%zd.%.6ld] ", > + ts.tv_sec, ts.tv_nsec / 1000); It seems we also have a getmicrouptime(), which returns a struct timeval. Also a more general question: is it actually safe to call getnanouptime() here? This code gets executed from an arbitrary context, right? --=20 Ed Schouten WWW: http://80386.nl/ --jlu4pbQiFVtq/4uk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOnKrDAAoJEG5e2P40kaK7w/IQAJ4w15oQTzDkGex1kkcrYtY5 vV5yvHg/YmA9DLr4sPw8kSMYris69YDMwKK9e2DCxlxAAet/wIGwa9PwXDABv0eD HqjVgwV4jbl3fN+5wSePalIT4Jbn4bx3M4eDCQIfJosTB5y6K05uqwz/sEuAV3vC +Vt2PG2/X8U4EkDc/Q9M8YZ2fL7iN8kdzqOACJNemmEzX+pazaAV5QZddw9Rwr9T edmP/4nM6ft2+wnCb8K1TZUtvCzaO05EfnzvpYicWjKcTVVOE9y2Tclspe9afann 3RU/5+ExdBhVM/dnPxXs1THRqvlG5G0lCFU9HA7COONnvbNyQ7+AWP2zTjbOAUIT mV7k2zjUh9jYct5+lCQR42uOlk21bMLUEtJ6rxhe21Hwx9XdWG3+hBfNo9LOrSkn iYe8PczJ9hNvjJcylvNyBOiuz9v6CwtR+S1nR7NV1LjicoWYDNKXfEvUDkjMg6wt Ob/PeJuOFVfCsWdHyRCLjFe1qam+RP10CmCvJ3hN16oFaZ4gmOG3FkHTuf6Fn00c 3CRvlzDTWSufEjv67jnfg81GEBR88nyDJV6f6bSpoCp9S4WUh+03IQjifxYYzD4H ffYy7yyWUJfjYU99NB5ar69tYLdV+2Do5C1DIYcF4w6Qma3v/aPvpfGqAC7MF+Zy ddy38pmfpzQaZ16zemmu =wH27 -----END PGP SIGNATURE----- --jlu4pbQiFVtq/4uk--