#NEWLINE# def make_batched_timer( bucket_seconds , chunk_size = 100 ) : #NEWLINE# #INDENT# '\n    Creates and returns an object implementing\n    :class:`txaio.IBatchedTimer`.\n\n    :param bucket_seconds: the number of seconds in each bucket. That\n        is, a value of 5 means that any timeout within a 5 second\n        window will be in the same bucket, and get notified at the\n        same time. This is only accurate to "milliseconds".\n\n    :param chunk_size: when "doing" the callbacks in a particular\n        bucket, this controls how many we do at once before yielding to\n        the reactor.\n    ' #NEWLINE# get_seconds = config . loop . time #NEWLINE# return _BatchedTimer ( ( bucket_seconds * 1000.0 ) , chunk_size , seconds_provider = get_seconds , delayed_call_creator = call_later )