def _SleepTime(self, total, limit, duration):
    if not limit:
      return 0.0
    return max(0.0, (total / limit) - duration)
Calculate the time to sleep on a throttle.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/remote_api/throttle.py/Throttle._SleepTime