www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/28/04:04:52

Date: Wed, 28 Feb 1996 09:49:42 +0100 (MET)
From: erik AT tntnhb3 DOT tn DOT tudelft DOT nl (Erik Luijten)
Subject: time measurement in protected mode?
To: djgpp AT delorie DOT com (djgpp)
Message-id: <9602280849.AA20596@tntnhb3.tn.tudelft.nl>

Hi!

Maybe this is a stupid question, but I was wondering about the following:
I have written a program in which I have to keep track of the time spent
in various subroutines. On my workstation this works fine, but if I do this
in a DJGPP-compiled version on a PC, the timing routine considerably slows
down the program. I understand that this is caused by the switch from protected
to real mode. Is there any way to do a time measurement without this switch?
Or does it necessarily involve some BIOS function and hence a switch?

A related question: at first I used biostime(), but this function restarts at
midnight. Now I'm using clock(), but I have no idea whether this function
will wrap around as well? If so, I wonder whether this occurs at the same time
in DJGPP v1 and v2, because CLOCKS_PER_SEC as defined in time.h is completely
different in both versions.

Finally (this may be a faq, but I couldn't find it): I really like the
go32=topline feature of v1. Is there something similar in v2, or is this
impossible because the DPMI host now takes care of many things? In that case,
would it be possible to include such a function is CWSDPMI?

Many thanks in advance for you answers,

Erik

-- 
         Erik Luijten          |   Theoretical Physics Section
  erik AT tntnhb3 DOT tn DOT tudelft DOT nl   |   Faculty of Applied Physics
                               |   Delft University of Technology
      tel. +31-15-2786156      |   P.O. Box 5046
      fax  +31-15-2781203      |   2600 GA Delft --- The Netherlands

- Raw text -


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