I need code that will do this:
def foo():
now = datetime.datetime.utcnow()
# Some code will run that takes a variable amount of time
# (less than 15 minutes)
# This code should run no sooner than 15 minutes after `now`
Note that this is not the same as using time.sleep
! time.sleep
would halt the entire process, but I need computation in foo()
to happen and for foo()
to return no sooner than 15 minutes after it begins.