Measures the time it takes to find paths.