adjust the sleep before the printf in beep thread