original_docstring: Time_limit is in units of seconds.
docstring: Time_limit is in units of seconds.
docstring_tokens: Time_limit is in units of seconds .
code: def rate_limit(obj = None, *, max_calls = 30, time_limit = 60):
      '''Time_limit is in units of seconds.'''
  
      if obj is None:
          obj = RateLimit(max_calls, time_limit)
  
      def limit_decorator(func):
          @functools.wraps(func)
          def limit_wrapper(*args, **kwargs):
              while obj.pause():
                  if __debug__: log('waiting on rate limit')
                  now = perf_counter()
                  sleep(obj.time_limit - (now - obj.time))
              return func(*args, **kwargs)
          return limit_wrapper
      return limit_decorator
code_tokens: def rate_limit ( obj = None , * , max_calls = 30 , time_limit = 60 ) : if obj is None : obj = RateLimit ( max_calls , time_limit ) def limit_decorator ( func ) : @ functools . wraps ( func ) def limit_wrapper ( * args , ** kwargs ) : while obj . pause ( ) : if __debug__ : log ( 'waiting on rate limit' ) now = perf_counter ( ) sleep ( obj . time_limit - ( now - obj . time ) ) return func ( * args , ** kwargs ) return limit_wrapper return limit_decorator
short_docstring: Time_limit is in units of seconds.
short_docstring_tokens: Time_limit is in units of seconds .
comment: '''Time_limit is in units of seconds.'''