Files
django-q2/django_q/tests/tasks.py
T
Ilan Steemers 90b5b0d6ab moved static methods to module functions
medic is now sentinel and runs in it's own process
sentinel shutdown procedure more stable
2015-06-18 14:10:48 +02:00

10 lines
173 B
Python

import time
# simple countdown
def countdown(n):
start_time = time.time()
while n > 0:
n -= 1
stop_time = time.time()
return stop_time - start_time