Depends on what environment you are using. Which OS would be a good start.

--
Mats

05-21-2008

NeMewSys

Windows XP

05-21-2008

matsp

Is it a console or windowed application? In a windowed application, you use SetTimer and then use the WM_TIMER or [in MFC] OnTimer() to process your timer.

In console, it sort of depends on what else you are doing, since it's not event-driven in the way that a Windows app is, so you would need to find some other solution. There are several, but it would be good if you could explain what your application is doing when you want to call a function every sixty seconds. Options include using Sleep() or using multiple threads.

--
Mats

05-21-2008

swgh

Example of matsp suggestion

Code:

for ( ;; )
{
if ( flag > 3 )
{
break;
}

Sleep(60000);

F();
flag++;
}

Not the best example but its more or less what he was on about. The trick is implementing this sort of algorithm into your code