Hi,
Would anyone know how to add a delay to a function or app using python shiny? I want to simulate a slow loading function but adding the time.sleep function did not slow my app down as expected
Specifically I added the code below to a sample app on shiny live (including link to live app)
startTime = time.time()
for i in range(0, 5):
print(i)
# making delay for 1 second
time.sleep(1)
endTime = time.time()
elapsedTime = endTime - startTime
print("Elapsed Time = %s" % elapsedTime)
Thanks,
Iain