mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-25 01:48:11 +08:00
14 lines
240 B
Python
14 lines
240 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
|
|
|
|
|
|
def result(obj):
|
|
print('RESULT HOOK: {}'.format(obj.result))
|