wake_up() call from init_notification to onNotify
replace var "now" with calls to time()

we can't depend on the variable now to contain the current
time, since the mainloop that updates that variable might be blocking
while other things can still access the variable.