         timerAction = SKAction.repeatActionForever(SKAction.sequence([actionwait,actionForEverySecond(actionPerSecond)]))
         
         if let timerAction = timerAction {
-            label.runAction(timerAction, withKey: "timer")
+            self.runAction(timerAction, withKey: "timer")
         }
     }
     
     func pause() {
         running = false
-        label.removeActionForKey("timer")
+        self.removeActionForKey("timer")
     }
     
     func stop() {


    private var counter: Int {
        didSet {
            label.text = String(counter)
        }
    }
    

import Foundation
import SpriteKit

class DLSpriteKitTimer: SKLabelNode {
    init(seconds: Int, withActionPersecond: (() -> ())?, withFiringAction: () -> (), decreasing: Bool) {
        self.running = false
        self.actionPerSecond = withActionPersecond
        self.firingAction = withFiringAction
        self.decreasingTime = decreasing
        
        if self.decreasingTime {
            self.firstSecond = seconds
            self.lastSecond = 0
