use http://golang.org/pkg/time/#Tick

create a tick object when use it in a case in your select. This way your function is responsive to stop and still obeys the loop sleep you've defined.