title: Can sleep() in c++ in unix environment be used as the same as delay() in Turbo C++ for windows?
body: <p>In Turbo C++:</p>
  
  <pre><code>while(i&lt;10)
  {delay(100);
  cout&lt;&lt;"*";
  i++;}
  </code></pre>
  
  <p>will print "*" after a regular intervals of 100 milliseconds. If I try to do the same in C++ in UNIX like:</p>
  
  <pre><code>while(i&lt;10)
  {
  sleep(1);
  cout&lt;&lt;"*";
  i++;}
  </code></pre>
  
  <p>it prints "*" 10 times after a single interval of 10 seconds at once.</p>
  
  <p>Please, can someone explain why is it not working.</p>