home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!comlab.ox.ac.uk!oxuniv!ayoung
- From: ayoung@vax.oxford.ac.uk
- Newsgroups: comp.lang.c
- Subject: Re: High resolution timing?
- Message-ID: <1992Dec13.000441.10734@vax.oxford.ac.uk>
- Date: 13 Dec 92 00:04:41 GMT
- References: <17971@mindlink.bc.ca> <RDORICH.92Nov30220930@jade.tufts.edu>
- Organization: Oxford University VAX 6620
- Lines: 18
-
- In article <RDORICH.92Nov30220930@jade.tufts.edu>, rdorich@jade.tufts.edu (Rob) writes:
- > Ok, what you might want is clock(). It will return you the number of
- > CPU time (in microseconds) used since the _FIRST_ clock() in that
- > program. I actually just found about it today :) I think it's kind
- > of a pain that it always gives you the time since the first clock().
-
- Please read the manual again before implementing this bit of advice. The time
- returned by clock() is NOT usually in microseconds - my VAX system uses units
- of 10 miliseconds, whereas some of my PCs use units of 1/18.2 seconds! You
- need to look up the compiler-specific #definition CLOCKS_PER_SEC which will
- tell you the unit that clock() returns.
-
- -------------------------------------------------------------------------------
- ___
- / \ / | / Alan Young @ uk.ac.ox.vax
- /____/ / ___ __ |___/
- / / / / | / | / "The bigger they are,
- / \_/\__\__/|_/ /_________/ the harder they fall on you."
-