|
@@ -77,9 +77,9 @@ def timed_action(interval: Union[int, float, datetime.timedelta] = None):
|
|
|
timedelta = interval
|
|
|
|
|
|
def timer(function_to_time):
|
|
|
- def timed_function(*args, **kwargs):
|
|
|
+ def timed_function(*args, force: bool = False, **kwargs):
|
|
|
nonlocal last_call
|
|
|
- if now() > last_call + timedelta:
|
|
|
+ if force or now() > last_call + timedelta:
|
|
|
last_call = now()
|
|
|
return function_to_time(*args, **kwargs)
|
|
|
return
|