summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 499af2039..38cdb8021 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -334,6 +334,13 @@ def utcnow():
utcnow.override_time = None
+def is_then_greater(then, seconds):
+ if utcnow() - then > datetime.timedelta(seconds=seconds):
+ return True
+ else:
+ return False
+
+
def utcnow_ts():
"""Timestamp version of our utcnow function."""
return time.mktime(utcnow().timetuple())