Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Elliott Lee Newsgroups: scea.yaroze.programming.gnu_compiler Subject: Re: Timing Code Date: Fri, 10 Apr 1998 11:59:56 -0700 Organization: Cisco Systems Lines: 27 Message-ID: <352E6C2C.DACE5289@netmagic.net> References: <6gllke$3684@scea> Reply-To: tenchi@cisco.com NNTP-Posting-Host: dhcp-e-39-237.cisco.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (Win95; U) You could look into using the root counter and check it every once in a while. I use the vsyncs at 1/60 sec. It works okay if you use a fixed-point vector. (e.g. 0x00000444 * 60 = 0x0000FFF0, that's about a 2.5% error from 0x00010000.) Actually count the vsyncs to get a 100% accurate timing, provided that one iteration of your code executes within 1/60 sec. - e! cnevison wrote: > > Does anyone know how to do timing with the gcc compiler? > > The "time.h" file is not supported in the basic CD-ROM > from yaroze. > > I want to be able to obtain times in seconds. Does anyone > know how to do this? > > -rschutt@cs.colgate.edu -- - e! tenchi@netmagic.net http://www.netmagic.net/~tenchi/yaroze/