title: How to pause a thread in java?
body: <p>Consider the following code:</p>
  
  <blockquote>
    <p>while(true) {
        someFunction();
        Thread.sleep(1000);
    }</p>
  </blockquote>
  
  <p>What I want is that, someFunction() be called once every 10 seconds. But this is not the case. It is being called every second. I tried Thread.wait(1000), but even that doesnt help. I removed of the while part, just kept the body, and at the end wrote :</p>
  
  <blockquote>
    <p>Thread.start();</p>
  </blockquote>
  
  <p>But it throwed an exception. Is there any other solution to this?</p>