Is this thread safe?
If the timer runs a long period and the thread that want to be waked dies within this period `timer->arg` points somewhere in the stack.