Connecting Tech Pros Worldwide Help | Site Map

Count Down

  #1  
Old August 19th, 2005, 06:05 AM
bballmitch
Guest
 
Posts: n/a
I'm in the process of making a game right now, a very simple one, in
which there is a time limit of when you can accomplish something. So
what i want to do is make a 60 sec. countdown in my window. Could
someone help me out? i thought of doing a loop that lasts around 1
sec. but there are a few problems with that.
1. it will slow the rest of the program down
2. i can't be sure that its an exact second
and 3. the loop will last longer on some computers than others.

so how should i go about this?

  #2  
Old August 19th, 2005, 08:25 AM
Steffen
Guest
 
Posts: n/a

re: Count Down


Hi,
[color=blue]
> I'm in the process of making a game right now, a very simple one, in
> which there is a time limit of when you can accomplish something. So
> what i want to do is make a 60 sec. countdown in my window. Could
> someone help me out? i thought of doing a loop that lasts around 1
> sec. but there are a few problems with that.
> 1. it will slow the rest of the program down
> 2. i can't be sure that its an exact second
> and 3. the loop will last longer on some computers than others.[/color]

this is not exactly a question on c++, the answer depends very much on
the platform or the gui you are using, so you might want to consider a
more specific newsgroup. Just two examples: on Unix/Linux, you can set
an alarm clock which sends a signal to your process after some time;
if you are using QT you can set a timer, I guess other gui's have a
similar feature.

Steffen

  #3  
Old August 19th, 2005, 09:05 AM
bballmitch
Guest
 
Posts: n/a

re: Count Down


im using Microsoft XP(windows) and i don't know what else to tell you.
im also using Dev. C++ if you need to know my compiler. where do you
suggest i ASK this question?

  #4  
Old August 19th, 2005, 09:55 AM
krishanu.debnath@gmail.com
Guest
 
Posts: n/a

re: Count Down



bballmitch wrote:[color=blue]
> im using Microsoft XP(windows) and i don't know what else to tell you.
> im also using Dev. C++ if you need to know my compiler. where do you
> suggest i ASK this question?[/color]

Please reply with proper context. Did you try comp.programming?

Krishanu

  #5  
Old August 19th, 2005, 10:05 AM
Steffen
Guest
 
Posts: n/a

re: Count Down


Hi
[color=blue]
> im using Microsoft XP(windows) and i don't know what else to tell you.
> im also using Dev. C++ if you need to know my compiler. where do you
> suggest i ASK this question?[/color]

I don't program on windows, so I don't really >know<, but my guess would
be some newsgroup containing "programmer" and "windows"

Steffen



  #6  
Old August 19th, 2005, 12:15 PM
Jim Langston
Guest
 
Posts: n/a

re: Count Down



"bballmitch" <lubanfamily@sbcglobal.net> wrote in message
news:1124427456.866001.111830@f14g2000cwb.googlegr oups.com...[color=blue]
> I'm in the process of making a game right now, a very simple one, in
> which there is a time limit of when you can accomplish something. So
> what i want to do is make a 60 sec. countdown in my window. Could
> someone help me out? i thought of doing a loop that lasts around 1
> sec. but there are a few problems with that.
> 1. it will slow the rest of the program down
> 2. i can't be sure that its an exact second
> and 3. the loop will last longer on some computers than others.
>
> so how should i go about this?[/color]

Since you say you're on M$ you should check a Microsoft group, but just
search for "tiime" "timer" "date" etc.. functions. each returns the time in
a different way.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Down days. KMEscherich answers 2 June 29th, 2007 03:39 AM
count down timer source code updated to 06/11/27 HeroinNO.4@gmail.com answers 7 November 27th, 2006 11:15 PM
Latest version count down timer source code released ! HeroinNO.4@gmail.com answers 2 November 17th, 2006 11:15 PM
Full featured count down timer source code HeroinNO.4@gmail.com answers 1 November 11th, 2006 08:35 AM
A cool count down timer sourcecode ! HeroinNO.4@gmail.com answers 2 October 30th, 2006 07:15 AM