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

Similar Threads

help pls... 1
i need help about Turbo C 18
interesting problem in turbo C++, involving fopen 7
Chatbot 0
C language now truly universal 0
Comparision of C Sharp and C performance 360
C coding guidelines 99
Writing Classes 4

Members online

Forum statistics

Threads
474,261
Messages
2,571,040
Members
48,769
Latest member
Clifft

Latest Threads

Top