Measuring System Speed 
Author Message
 Measuring System Speed

Quote:

> I'm developing a DOS C application that I want to run at the same
> speed no matter what computer it's running on. (I'm willing to let the
> slowest computer be, say, a 386 20-MHz system, so that slower systems
> are not an issue here.) Therefore, I must be able to determine the
> speed of the system so that I can compensate for faster systems by
> applying appropriate delays.

> Can someone direct me to software that detects system speed?

First of all, this is a DOS question so please followup in
comp.os.msdos.programmer.  However, here is a pointer or two.

One way to handle this that I have tried is to run a test loop
at the start of your program to test the processor.  This works
for DOS programs but of course even DOS programs get run under
Windows these days so don't count on the results being consistent.

Your best bet is to use system timing functions and sleep until
you are due to continue.  How you do this will depend on your
specific requirements.  I have used a very simple technique that
involves no interrupt hooking.  I simply read the value at the
timer location in low memory.  Of course this doesn't work if
1/18 sec granularity isn't good enough.  It also doesn't release
the processor while you are waiting.

Best is to clarify your requirements and post again.  Perhaps
something is mentioned in the FAQ for comp.os.msdos.programmer.

--

http://www.*-*-*.com/ ;              |  and a sheep voting
on        
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.



Wed, 08 Mar 2000 03:00:00 GMT  
 Measuring System Speed

I'm developing a DOS C application that I want to run at the same
speed no matter what computer it's running on. (I'm willing to let the
slowest computer be, say, a 386 20-MHz system, so that slower systems
are not an issue here.) Therefore, I must be able to determine the
speed of the system so that I can compensate for faster systems by
applying appropriate delays.

Can someone direct me to software that detects system speed?



Wed, 08 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Tool for measuring speed of C code wanted

2. Measuring algorithm speed

3. Measure my hard disk speed.

4. Measuring System Performance

5. Digression: use of perror() (Re: High speed serial I/O under system load)

6. Speeding up system clock?

7. Altering the speed of the system clock?

8. How to speed up large system builds?

9. How to speed up large system builds?

10. Speeding up system response time

11. How to speed up large system builds?

12. How to speed up large system builds?

 

 
Powered by phpBB® Forum Software