Right now I'm working with streams, I have to sense something and save the result 'continuously', the trick is that every six minutes I have to stop, make a copy from the original file, re create the original file, and start again (is a block in gnuradio -just giving more info -).
I don't know how to track the 6 minutes period, any suggestion?
// Delay for x mins
// Change runtime # to increase or decrease time.
int runtime (6); // How many times you want the program to loop.
cout << "Counting down from " << runtime << " minutes\n";
cout << " Press CTRL-C to exit\n";
while (m != runtime)
// This will cause a 1 min delay, spit out a msg and sleep again
Sleep (60000); // 1000ms = 1 sec 60000 = 1 min 600000 = 10 min
m = (m+1);
g = (runtime - m);
cout << g << " mins to go..." << endl;
cout << runtime << " min delay reached\n";
int main ()