Merge "Manage time_in_state tracking from one place" into sc-dev