Revision f8326fca lib/utils/__init__.py
b/lib/utils/__init__.py | ||
---|---|---|
32 | 32 |
import re |
33 | 33 |
import errno |
34 | 34 |
import pwd |
35 |
import time |
|
35 | 36 |
import itertools |
36 | 37 |
import select |
37 | 38 |
import logging |
... | ... | |
592 | 593 |
return wrap |
593 | 594 |
|
594 | 595 |
|
596 |
def TimeoutExpired(epoch, timeout, _time_fn=time.time): |
|
597 |
"""Checks whether a timeout has expired. |
|
598 |
|
|
599 |
""" |
|
600 |
return _time_fn() > (epoch + timeout) |
|
601 |
|
|
602 |
|
|
595 | 603 |
class SignalWakeupFd(object): |
596 | 604 |
try: |
597 | 605 |
# This is only supported in Python 2.5 and above (some distributions |
Also available in: Unified diff