Use timeout instead of Thead/sleep in go block