mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-22 10:31:46 +03:00
21 lines
328 B
Python
21 lines
328 B
Python
from app import app
|
|
from datetime import datetime
|
|
|
|
last = None
|
|
|
|
|
|
@app.route("/delay-init")
|
|
def delay_init():
|
|
global last
|
|
last = datetime.now()
|
|
return ""
|
|
|
|
|
|
@app.route("/delay")
|
|
def delay():
|
|
global last
|
|
diff = (datetime.now() - last).total_seconds()
|
|
assert diff > 1
|
|
last = datetime.now()
|
|
return ""
|