From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16967 invoked by alias); 31 Dec 2006 05:18:38 -0000 Received: (qmail 16958 invoked by uid 22791); 31 Dec 2006 05:18:38 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 31 Dec 2006 05:18:31 +0000 Received: from kahikatea.snap.net.nz (p202-124-124-107.snap.net.nz [202.124.124.107]) by viper.snap.net.nz (Postfix) with ESMTP id D8B8A3D8184; Sun, 31 Dec 2006 18:18:28 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id F21B0BE447; Sun, 31 Dec 2006 18:13:52 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17815.18190.987950.612053@kahikatea.snap.net.nz> Date: Sun, 31 Dec 2006 05:18:00 -0000 To: Daniel Jacobowitz Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [PATCH] MI: new timing command In-Reply-To: <20061231042547.GA3236@nevyn.them.org> References: <17814.10139.269708.848818@kahikatea.snap.net.nz> <17814.58031.865155.682869@kahikatea.snap.net.nz> <20061231042547.GA3236@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.92.3 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00389.txt.bz2 > The autoconf manual has information about this sort of thing. I see > that libiberty guards it, sometimes with HAVE_GETRUSAGE and other times > with that and HAVE_SYS_RESOURCE_H. > > Will libiberty's get_run_time suffice for whatever you were doing, > Nick? The manual says: -- Replacement: long get_run_time (void) Returns the time used so far, in microseconds. If possible, this is the time used by this process, else it is the elapsed time since the process started. Without looking at the code, I would guess it's just a wrapper for getrusage and it uses something like gettimeofday for elapsed time when it can't find it. I think if user time isn't available it's best just to make -enable-timings fail, so I'll use Eli's suggestion. -- Nick http://www.inet.net.nz/~nickrob