Count Down

Discussion in 'C++' started by bballmitch, Aug 19, 2005.

  1. bballmitch

    bballmitch Guest

    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?
    bballmitch, Aug 19, 2005
    #1
    1. Advertising

  2. bballmitch

    Steffen Guest

    Hi,

    > 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.


    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
    Steffen, Aug 19, 2005
    #2
    1. Advertising

  3. bballmitch

    bballmitch Guest

    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?
    bballmitch, Aug 19, 2005
    #3
  4. bballmitch

    Guest

    bballmitch wrote:
    > 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?


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

    Krishanu
    , Aug 19, 2005
    #4
  5. bballmitch

    Steffen Guest

    Hi

    > 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?


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

    Steffen
    Steffen, Aug 19, 2005
    #5
  6. bballmitch

    Jim Langston Guest

    "bballmitch" <> wrote in message
    news:...
    > 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?


    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.
    Jim Langston, Aug 19, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QW5kcmV3?=

    count down

    =?Utf-8?B?QW5kcmV3?=, Sep 1, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    593
    =?Utf-8?B?QW5kcmV3?=
    Sep 5, 2005
  2. efelnavarro09
    Replies:
    2
    Views:
    900
    efelnavarro09
    Jan 26, 2011
  3. Michael Brooks

    For loops don't count down

    Michael Brooks, Feb 19, 2007, in forum: Ruby
    Replies:
    9
    Views:
    124
    Michael Brooks
    Feb 19, 2007
  4. Replies:
    2
    Views:
    383
    Randy Webb
    Oct 31, 2006
  5. Replies:
    1
    Views:
    107
    Randy Webb
    Oct 31, 2006
Loading...

Share This Page