Timer functions for DOS box program?

D

Dave

I have a program written in C that needs a way to run a function every
second or two (resolution 100 mS). The program is a console program.
What I would like is likely a DOS API that allows a sleep for a
period of time so that other operations on the computer are not
disturbed. I have looked through a few books, the web, and news
groups, but have not found a solution. I recall a number of DOS
programs, such as games and terminal programs, that used similar
functionality. Any suggestions?

Portability is not a big issue in that it is a DOS program always, but
that said, there may be differences between the versions of DOS and
Windows that will need to be tested in code.
 
K

Keith Thompson

Dave said:
I have a program written in C that needs a way to run a function every
second or two (resolution 100 mS). The program is a console
program. What I would like is likely a DOS API that allows a sleep for
a period of time so that other operations on the computer are not
disturbed. I have looked through a few books, the web, and news
groups, but have not found a solution. I recall a number of DOS
programs, such as games and terminal programs, that used similar
functionality. Any suggestions?

Portability is not a big issue in that it is a DOS program always, but
that said, there may be differences between the versions of DOS and
Windows that will need to be tested in code.

Standard C has no good way to do this. You said you're looking for a
DOS API; you'll have better luck finding it in a system-specific
newsgroup.

comp.os.msdos.programmer *might* be the best place to ask, but that's
based only on the name of the group. Take a look at the existing
articles first, and find out if they have an FAQ list.
 
J

Joe Schmo'

comp.os.msdos.programmer *might* be the best place to ask, but that's
based only on the name of the group. Take a look at the existing
articles first, and find out if they have an FAQ list.

At one time that was a very active group, but not any more. MS has lots of
public news groups available. Set you're news reader to server:
msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,614
Members
45,290
Latest member
JennaNies

Latest Threads

Top