11 lines
225 B
Python
11 lines
225 B
Python
|
#!/usr/bin/env python
|
||
|
import sched, time
|
||
|
|
||
|
s = sched.scheduler(time.monotonic, time.sleep)
|
||
|
def print_time(a='default'):
|
||
|
print("From print_time", time.time(), a)
|
||
|
|
||
|
|
||
|
s.enter(1, 1, print_time, kwargs={'a': 'keyword'})
|
||
|
s.run()
|