This could be split into a few smaller patches. Moving from storing `period_ms` to `period` would be an obvious single change. Also you could add `set_event_handle` before the change to the timer logic (while continuing to keep the event on the PE-side until everything is moved across). Likewise the test on `flags` in `_Start` could be moved to the unixlib earlier.