 let Seconds = 1.0
 let Minutes = 60.0 * Seconds
 let Hours   = 60.0 * Minutes
+let Days   = 24.0 * Hours
 
 // A very basic terminal UI.
 class TerminalUI {
     // If set, the next program generated by the fuzzer will be printed to the screen.
     var printNextGeneratedProgram: Bool
+    
+    // Start time of this fuzzing session
+    let startTime = Date()
+    
+    // Timestamp when the last interesting program was found
+    var lastInterestingProgramFound = Date()
     
     init(for fuzzer: Fuzzer) {
         printNextGeneratedProgram = false

        case .fuzzing:
            phase = "Fuzzing (with \(fuzzer.engine.name))"
        }

        print("""
        Fuzzer Statistics
        -----------------
        Fuzzer phase:                 \(phase)
        Total Samples:                \(stats.totalSamples)
        \(interestingSamplesInfo)
        Valid Samples Found:          \(stats.validSamples)
        Corpus Size:                  \(fuzzer.corpus.size)
        Correctness Rate:             \(String(format: "%.2f%%", stats.successRate * 100))

            Type collection failure rate: \(String(format: "%.2f%%", stats.typeCollectionFailureRate * 100))
            """)
        }
    }
    
    private func formatTimeInterval(_ interval: TimeInterval) -> String {
        let days = Int(interval / Days)
        let hours = Int(interval / Hours) % 24
        let minutes = Int(interval / Minutes) % 60
        let seconds = Int(interval / Seconds) % 60
        return String(format: "%id %ih %im %is", days, hours, minutes, seconds)
    }
    
    private enum Color: Int {
