From owner-freebsd-hackers Fri Aug 16 8:28:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD51537B400 for ; Fri, 16 Aug 2002 08:28:32 -0700 (PDT) Received: from mail.asitatech.com (mail.asitatech.ie [193.120.151.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCAC143E70 for ; Fri, 16 Aug 2002 08:28:31 -0700 (PDT) (envelope-from devnull@asitatech.ie) Received: from yoda.asitatech.ie ([192.168.127.212]) by mail.asitatech.com (Merak 4.2.3) with ESMTP id FJA37319 for ; Fri, 16 Aug 2002 16:25:22 +0100 Received: by yoda.asitatech.ie (Postfix, from userid 1001) id A9E975A59; Fri, 16 Aug 2002 16:31:25 +0000 (GMT) Date: Fri, 16 Aug 2002 16:31:25 +0000 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Subject: Re: runtime Message-ID: <20020816163125.GB12216@yoda.asitatech.ie> Mail-Followup-To: freebsd-hackers@freebsd.org References: <3D5D1863.2050209@math.missouri.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D5D1863.2050209@math.missouri.edu> User-Agent: Mutt/1.3.27i X-OS: FreeBSD 4.5-STABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Would getrusage() help ? On Fri, Aug 16, 2002 at 10:21:07AM -0500, Stephen Montgomery-Smith wrote: > How do I do the following: > > 1) Find out how much time a program has currently consumed in computer > time (something like what the time command outputs - but I want the > program to do find this out about itself); > > 2) Have a thread wait for a specified amount of computer time (not > actual time so nanosleep won't work). > > I looked at the man pages, but all I could find was runtime which seems > only to be accessible from the kernel. -- Sergey Lyubka Asita Technologies Int, Galway, Ireland To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message