Lucky
Game- and Quizmaster
- Joined
- Nov 6, 2001
- Messages
- 2,304
I am currently trying to find a working (on a PC C-software surrounding) µseconds function.
Meaning that I need a function that can precisely give me a delay of milliseconds, with precision of microseconds.
C standard libraries give me:
function - precision :
sleep - seconds
delay - milliseconds
and
usleep - microseconds, but this does not work properly in the microseconds range under Windoze or DOS
So if anyone here knows a C function (not neccessarly from a standard library) please let me know.
Currently I'm investigating a clock function which times through the system clock, but that still is rather unprecise.
The alternative is to write an assembler program to directly program the timer chip 8253, which every PC has, and which every timer function uses in some ways. That will take much longer and time is an issue here, but that's how I'll do it if there is no other possibility.

Meaning that I need a function that can precisely give me a delay of milliseconds, with precision of microseconds.
C standard libraries give me:
function - precision :
sleep - seconds
delay - milliseconds
and
usleep - microseconds, but this does not work properly in the microseconds range under Windoze or DOS

So if anyone here knows a C function (not neccessarly from a standard library) please let me know.
Currently I'm investigating a clock function which times through the system clock, but that still is rather unprecise.

The alternative is to write an assembler program to directly program the timer chip 8253, which every PC has, and which every timer function uses in some ways. That will take much longer and time is an issue here, but that's how I'll do it if there is no other possibility.
