Timing Problem

Hey guys, can someone help me with a function subprogram or a set of statements that allow me to do something within a time limit. I want to create a self-regulated test such that:

cout <<"Press 'S' to start"<<endl;
cin >>ready;

while(!((ready == 's')||(ready == 'S')))
{
cout <<"Press 'S' to start"<<endl;
cin >>ready;
}
if((ready == 's')||(ready == 'S'))
while(time != 0) *this is the part I need*
{
//here we have the actual test
}

Topic archived. No new replies allowed.