Timer and gracefully stop