(*args, **kwargs)
| 106 | def decorator(func): |
| 107 | @wraps(func) |
| 108 | def wrapper(*args, **kwargs): |
| 109 | elapsed = time.time() - last_called[0] |
| 110 | wait_time = min_interval - elapsed |
| 111 | if wait_time > 0: |
| 112 | time.sleep(wait_time) |
| 113 | result = func(*args, **kwargs) |
| 114 | last_called[0] = time.time() |
| 115 | return result |
| 116 | |
| 117 | return wrapper |
| 118 |
nothing calls this directly
no outgoing calls
no test coverage detected