Fix time_watcher thread shutdown
Add time_watcher tests