From owner-freebsd-hackers Fri Aug 16 8:31:11 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 AA39E37B400 for ; Fri, 16 Aug 2002 08:31:09 -0700 (PDT) Received: from sccmmhc01.mchsi.com (sccmmhc01.mchsi.com [204.127.203.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AFB643E7B for ; Fri, 16 Aug 2002 08:31:09 -0700 (PDT) (envelope-from stephen@math.missouri.edu) Received: from math.missouri.edu ([12.216.242.20]) by sccmmhc01.mchsi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020816153108.VSEA23220.sccmmhc01.mchsi.com@math.missouri.edu> for ; Fri, 16 Aug 2002 15:31:08 +0000 Message-ID: <3D5D1ABC.4080102@math.missouri.edu> Date: Fri, 16 Aug 2002 10:31:08 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Subject: Re: runtime References: <3D5D1863.2050209@math.missouri.edu> <20020816163125.GB12216@yoda.asitatech.ie> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 It looks like exactly what I want. Thanks. Sergey Lyubka wrote: > 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. > > -- Stephen Montgomery-Smith stephen@math.missouri.edu http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message