Delete unused function update_alarm