Im trying to make a timer that does an action very 10 seconds but I cant get it to work.
class Income
{
public:
Income()
:
Bank( 0 ),
x( 0 ),
time( 0 )
{}
void GetIncome()
{
time = timer.GetTimeMilli();
if( x == 0 )
{
timer.StartWatch();
x = 1;
}
if( time == 1000 )
{
timer.StopWatch();
Bank += 1;
x = 0;
}
}
public:
int Bank;
private:
int time;
Timer timer;
int x;
};
Does anyone know what I did wrong?
Trouble with Timer
Trouble with Timer
Computer too slow? Consider running a VM on your toaster.
Re: Trouble with Timer
Wow ummm nevermind I solved it.
Computer too slow? Consider running a VM on your toaster.