Rather than this being a func, it should create a timer with time.After which returns a channel. It can then use a select to toggle between the close channel (which will be used by HttpInput to flag the monitor to close), and the timer. This way the monitor will exit quickly when shutting down in a graceful manner.