         map(meters) { $0.expire() }
     }
     
-    func reset(m: Meter) {
-        m.actionCost = 0
-        m.firstActed = nil
+    func reset(source: Meter) {
+        let n = source.name
+        let t = source.currentTimeCost(lastActed)
+        for m in meters {
+            let tt = m.timeCosts[n] ?? 0
+            m.timeCosts[n] = tt + t
+        }
+        source.actionCost = 0
+        source.firstActed = nil
+        source.timeCosts = [:]
         updated = true
     }
     

        return restLeft
    }
    
    func status(lastActed: Double) -> Double {
        let timed = has(timeLimit)
        let activeElapsed = firstActed != nil ? lastActed - firstActed! : 0
        if has(actionLimit) {
            return actionLimit! - actionCost
        }
        if timed {
            return timeLimit! - activeElapsed
        }
        return actionCost
    }
    
    func expire() {

    }
    
    func expire() {
        errorLog?.info("expire")
        app?.expire()
    }
    
    func createExpireTimer() -> NSTimer {
        errorLog?.info("createExpireTimer")
        expire()
        return NSTimer.scheduledTimerWithTimeInterval(
            86400.0, target: self, selector: "expire", userInfo: nil, repeats: true)
    }

    func applicationDidFinishLaunching(aNotification: NSNotification) {
        root = "~/Library/Application Support/Ergometer".stringByStandardizingPath
        errorLog = ErrorLog(root: root)

        item = NSStatusBar.systemStatusBar().statusItemWithLength(/* NSVariableStatusItemLength */ -1)
        let prompt: String = kAXTrustedCheckOptionPrompt.takeUnretainedValue()
        let trusted = AXIsProcessTrustedWithOptions([prompt: true]) != 0
