Guest User

Untitled

a guest
Dec 12th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. class sleep:
  2. def __init__(self, secs):
  3. self.secs = secs
  4.  
  5. def __call__(self, func):
  6. from functools import wraps
  7.  
  8. @wraps(func)
  9. def wrapper(*args, **kwargs):
  10. from time import sleep
  11.  
  12. sleep(self.secs)
  13. return func(*args, **kwargs)
  14.  
  15. return wrapper
Add Comment
Please, Sign In to add comment