title: Throttling method calls using Guava RateLimiter class
body: <p>I am trying to throttle the number of calls to a method per second.
  I tried to achieve this using Guava RateLimiter.</p>
  
  <pre><code>RateLimiter rateLimiter = RateLimiter.create(1.0);//Max 1 call per sec
  rateLimiter.acquire();
  performOperation();//The method whose calls are to be throttled.
  </code></pre>
  
  <p>However the methods to the call are not limited to 1 per second but are continuous.</p>
  
  <p>The throttling can be achieved using Thread.sleep() but i wish to use Guava rather that sleep().  </p>
  
  <p>I would like to know the right way to achieve the method call trottling using Guava RateLimiter. 
  I have checked the documentation for RateLimiter and tried to use the same but could not achieve the desired result.</p>