I would avoid using exceptions as part of the flow control, they should be reserved for "exceptional" cases. Can we consider using a return code for this `timespec_from_ms` function and check the return type?