On amazon contact control panel, I have multiple task contacts in line with separate contact state duration
When changing agent state from states dropdown, the state duration of all task contact automatically resets to zero seconds.
On our application connect streams method getStateDuration function is also returning reset duration in milliseconds.
Agent state duration should not have any impact on task contact state duration.