-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================

local function countdown()
	-- Show GUI
	TimerFrame.Visible = true
	
	-- Set time remaining to countdown duration
	local timeRemaining = DURATION
	
	-- Countdown
	repeat
		Timer.Text = tostring(timeRemaining)
		timeRemaining = timeRemaining - 1
		CountdownBeep:Play()
		wait(1)
	until timeRemaining == 0
	
	CountdownEndBeep:Play()
	-- Hide GUI
	TimerFrame.Visible = false
end