In Real Time you can configure the start time for your queue history and set thresholds for how long agents should be in specified states.