I think this is quite often enough, and more is likely to drain the
battery of mobile devices unacceptably.
def dbwatch():
"""
- Coroutine function: wake up every second and notice changes to the
+ Coroutine function: wake up every minute and notice changes to the
database. When a change happens, tell the Pinger (q.v.) to rescan its
peers.
"""
main = cr.parent
fw = M.FWatch(opts.cdb)
while True:
- timer = M.SelTimer(time() + 1, lambda: cr.switch())
+ timer = M.SelTimer(time() + 60, lambda: cr.switch())
main.switch()
if fw.update():
pinger.rescan(False)