added test for thread dispatcher with duration