#include <iostream>
#include <time.h>

void sleep (unsigned int mseconds) {
     
     clock_t goal = mseconds + clock();
     while(goal > clock());
     
}

using namespace std;

int main () {
    
    int delay;
    clock_t stop = clock() + 3000;
    
    delay = 800;
    
    while (stop > clock()) {
          
          cout << "\a";
          if (delay > 1) sleep(delay);
          //delay = delay - 100;
          delay = delay / 2;
    }
    return 0;
    
}
