module type LIFECYCLE =
LIFECYCLE provides the ability to watch important events
occuring in the life time of the program.
val watch :
'a event -> ('a -> unit) -> watcher
watch e fis a key-value watcher such that
fis called whenever event
val unwatch :
watcher -> unit
unwatch wstops the watcher
w. After that call it's callback is guaranteed not to be called again.
val poweron :
poweronoccurs shortly after the system powers up.
val poweroff :
poweroffoccurs shortly before the system is going to power off.
val suspend :
suspendoccurs shortly before the system is suspended.
val resume :
resumeoccurs shortly after the system resumes after having been