     var state: State = .noBenchmark {
         didSet { stateDidChange(from: oldValue, to: state) }
     }
+    var activity: NSObjectProtocol? // Preventing system sleep
 
     let model = Variable<Attaresult>(Attaresult())
     var m: Attaresult {

    //MARK: Start/stop

    func processDidStop(success: Bool) {
        refreshChart.nowIfNeeded()
        switch self.state {
        case .loading(_):

                                 maximumDuration: m.durationRange.value.upperBound.seconds)
        do {
            self.state = .running(try BenchmarkProcess(url: source, command: .run(options), delegate: self, on: .main))
            self.activity = ProcessInfo.processInfo.beginActivity(options: [.automaticTerminationDisabled, .idleSystemSleepDisabled],
                                                                 reason: "Benchmarking")

        }
        catch {
            self.log(.status, error.localizedDescription)
