def __init__(self, time, func, args, kw, cancel, reset, seconds=None):
"""
@param time: Seconds from the epoch at which to call C{func}.
@param func: The callable to call.
@param args: The positional arguments to pass to the callable.
@param kw: The keyword arguments to pass to the callable.
@param cancel: A callable which will be called with this
DelayedCall before cancellation.
@param reset: A callable which will be called with this
DelayedCall after changing this DelayedCall's scheduled
execution time. The callable should adjust any necessary
scheduling details to ensure this DelayedCall is invoked
at the new appropriate time.
@param seconds: If provided, a no-argument callable which will be
used to determine the current time any time that information is
needed.
"""
self.time, self.func, self.args, self.kw = time, func, args, kw
self.resetter = reset
self.canceller = cancel
self.seconds = seconds
self.cancelled = self.called = 0
self.delayed_time = 0
if self.debug:
self.creator = traceback.format_stack()[:-2]
评论列表
文章目录