I also wish for the user to be able to close the app and have the timer run in the background
The timer will not run in the background, but here is a technique that you could use:
Add a mechanism to detect when the app is entering the background, or foreground
On backgrounding:
If your timer is live...
Convert it to a notification (calculate the fire date from the timer expiry)
Cancel the timer
If the timer expires while the app is backgrounded, the user will see the notification
On foregrounding:
Remove pending notifications
Restart the timer, if it has not expired