You can also use this:
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
clock_t delay;
clock_t start;
// your loop here (eg: while, for, etc.)
delay = 0.3 * CLOCKS_PER_SEC; // replace 0.3 with your delay in seconds
start = clock();
while(clock() - start < delay)
;
// end your loop here
return 0;
}