 extension Constants {
   static let flags = ["--skip-tests", "--allow-warnings", "--skip-import-validation"]
   static let umbrellaPodFlags = Constants.flags + ["--use-json"]
+}
+
+public extension Date {
+  func dateTimeString() -> String {
+    let formatter = DateFormatter()
+    formatter.dateStyle = .short
+    formatter.timeStyle = .medium
+    return formatter.string(from: self)
+  }
+
+  func formattedDurationSince(_ date: Date) -> String {
+    let formatter = DateComponentsFormatter()
+    formatter.unitsStyle = .abbreviated
+    formatter.allowedUnits = [.hour, .minute, .second]
+    let secondsSinceDate = date.timeIntervalSince(self)
+    return formatter.string(from: secondsSinceDate) ?? "\(round(secondsSinceDate)) sec"
+  }
 }
 
 // SpecFiles is a wraper of dict mapping from required pods to their path. This


import ArgumentParser
import Foundation
private enum Constants {}

extension Constants {


    var exitCode: Int32 = 0
    var failedPods: [String] = []
    let startDate = Date()
    var minutes = 0
    for pod in specFileDict.depInstallOrder {
      var timer: DispatchSourceTimer = {
        let t = DispatchSource.makeTimerSource()
        t.schedule(deadline: .now(), repeating: 60)
        t.setEventHandler(handler: {
          print("Tests have run \(minutes) min(s).")
          minutes += 1
        })
        return t
      }()
      timer.resume()
      var podExitCode: Int32 = 0
      print("----------\(pod)-----------")
      switch pod {
