[PATCH 1/2] stk: Add duration_to_msecs to reduce duplication.