www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/07:49:43

Date: Mon, 17 Feb 1997 14:12:19 +0100 (MET)
From: Jan Hubicka <hubicka AT ta DOT jcu DOT cz>
To: Chad Molina <molinac AT mantech-wva DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: exact timming
In-Reply-To: <5e1tr1$1n1@news.mountain.net>
Message-ID: <Pine.LNX.3.91.970217141135.32046B-100000@tabor.ta.jcu.cz>
MIME-Version: 1.0

On Fri, 14 Feb 1997, Chad Molina wrote:

> Why not Isolate the section you are wanting to time, then run through
> it 1000 or so times. Like this
I can't do that because it is just small part of calculation and it time
differs (it is getting slower when you are zoomed in..)

Honza
> 
> (Ugly pseudocode follows  ; \  )
> 
> Get Start time
> 
> for i=0,1000
> {
> 	draw or whatever
> }
> 
> Get Stop time
> 
> Approx time = (Stop time - Start time) / 1000
> 
> Maybe this will help.
> 
> Chad J. Molina
> 
> 
> >Jan Hubicka <hubicka AT atrey DOT karlin DOT mff DOT cuni DOT cz> wrote:
> 
> >>I have small problem:
> >>XaoS needs to quite exactly time one part of program. (Uses it to calculate
> >>framerate: time*5 so for framerate 30 I need to know time in precisity 1/150sec.
> >>) higher precisity is better.
> >>Gettimeofday(I using in unix) is not exact enought (1/18.2sec...4 or inf frames
> >>per second) 
> 
> >>What is the best way to time this? Only I know about is to attach timer, set
> >>it to higher rate and make some my own counter. Can some send me code for this?
> >>Since I am lazy to study all irq attaching stuff under dpmi. Last time I did
> >>this is about 5 years ago in assembly.
> 
> 
> 

------------------------------------------------------------------------------
                   Have you browsed my www pages? Look at:
                       http://www.paru.cas.cz/~hubicka
      Koules-the game for Svgalib,X11 and OS/2,  Xonix-the game for X11
      czech documentation for linux index, original 2D computer art and
              funny 100 years old photos and articles are there!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019