Share common logic in timer_destroy between platforms.
Implement `timer` for Linux.