Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!mips!prls!philabs!linus!nixbur!nixpbe!peun33!freiss From: freiss@nixpbe.UUCP (the hacker) Newsgroups: comp.unix.questions Subject: Re: ATT Unix millisec clock Message-ID: Date: 9 Aug 90 10:18:03 GMT References: <13494@smoke.BRL.MIL> Sender: news@nixpbe.UUCP Lines: 34 In <13494@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >In article freiss@nixpbe.UUCP (the hacker) writes: >-So far, only SECOND resolution is permitted through the ATT Unix OS to time >-the elapsed time of a job. Millisecond resolution (or better) accessed >-from a .c executable is desired. I am running ATT Unix Version System 5 >-Version 3.2 on a Motorola 68020 based machine. >-System interrupts? Shell commands? Any solution to this thorny problem would >-be greatly appreciated... >Unfortunately, you have not stated a problem, but rather a desired SOLUTION. >If we knew what the real problem to be solved was, perhaps we could suggest >something helpful. Right :-) ok, what Nick Kawaguchi wants is a) something like a profiler with millisecond resolution to time how long a C-function takes to execute. BTW, thanks to all of you who replied suggesting the times() system call. He uses that now, though something that has a better resolution would be more useful. b) a sleep() call with millisecond or tenth of second resolution. Curses has a napms() function that supposedly does exactly that, but I'm told it is unreliable (i.e. doesn't really nap milliseconds, but 1 / HZ seconds). My guess is it's impossible, but then I'm not very wizardly concerning UN*X. All hints are appreciated. Thanks, -Martin freiss.pad@nixdorf.com