python exceute 60 records per minute counter

Solutions on MaxInterview for python exceute 60 records per minute counter by the best coders in the world

showing results for - "python exceute 60 records per minute counter"
Caterina
06 Oct 2019
1import sched, time
2s = sched.scheduler(time.time, time.sleep)
3def do_something(sc): 
4    print("Doing stuff...")
5    # do your stuff
6    s.enter(60, 1, do_something, (sc,))
7
8s.enter(60, 1, do_something, (s,))
9s.run()
10