class RateControl {

  protected long computeSleepDuration() throws DatabusException
  {
    long numEvents = _ra.getNumTicks();
    long numNSecsToHaveExpired = (numEvents * DbusConstants.NUM_NSECS_IN_SEC) / _maxEventsPerSec;
    long numNSecsExpiredSoFar = _ra.getDuration();
    if (numNSecsToHaveExpired > numNSecsExpiredSoFar)
    {
      return (numNSecsToHaveExpired - numNSecsExpiredSoFar);
    }
    else
    {
      return 0;
    }
  }

  public  RateControl(long numEventsPerSec, long throttleDurationInSecs);

}