Return durations in the foreach callback.