             let tripId = direction.tripIdentifiers?.first,
             let stopId = direction.stops.first?.id {
 
-            Network.getDelay(tripId: tripId, stopId: stopId).perform(withSuccess: { (request) in
-                if request.success {
-                    guard (request.data != nil), let delay = request.data else {
+            Network.getDelay(tripId: tripId, stopId: stopId).performCollectingTimeline { (response) in
+                switch response.result {
+                case .success(let delayResponse):
+                    guard (delayResponse.data != nil), let delay = delayResponse.data else {
                         self.setDepartureTimeAndLiveElements(withRoute: route)
                         return
                     }

                    if isNewDelayValue {
                        JSONFileManager.shared.logDelayParemeters(timestamp: Date(), stopId: stopId, tripId: tripId)
                        JSONFileManager.shared.logURL(timestamp: Date(), urlName: "Delay requestUrl", url: Network.getDelayUrl(tripId: tripId, stopId: stopId))
                        // JSONFileManager.shared.saveJSON(json, type: .delayJSON(rowNum: self.rowNum ?? -1))
                    }

                    let departTime = direction.startTime

//

import UIKit
import SwiftyJSON
import TRON

protocol TravelDistanceDelegate: NSObjectProtocol {
    func travelDistanceUpdated(withDistance distance: Double)
