Turbo c

P

phillip

Im havin' a problem in turbo c that i just cant solve..
Here's the prob..
i am going to create a timer...
sample run...
Enter hour:1 hr
Enter minutes:1 minute
Enter seconds: 50 seconds

then it will run until the time reaches zero...
can anybody give me a program for this??
pls....
 
N

Nick Keighley

Im havin' a problem in turbo c that i just cant solve..
Here's the prob..
i am going to create a timer...
sample run...
Enter hour:1 hr
Enter minutes:1 minute
Enter seconds: 50 seconds

then it will run until the time reaches zero...
can anybody give me a program for this??
pls....

this can't be done in standard C you need to call a platform
specific delay function. Try delay() or sleep().

Please use standard English it makes you posts easier to read.
 
R

Richard Heathfield

phillip said:
Im havin' a problem in turbo c that i just cant solve..
Here's the prob..
i am going to create a timer...
sample run...
Enter hour:1 hr
Enter minutes:1 minute
Enter seconds: 50 seconds

then it will run until the time reaches zero...
can anybody give me a program for this??
pls....

Look up time(), mktime(), and difftime(). It's not difficult, although
of course it will be a busy wait. If you want lazy wait, ask in an
MS-DOS newsgroup such as comp.os.msdos.programmer
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top