 //===-----------------------------------------------------------------------===//
 
 import CUV
+import Boilerplate
 
 public typealias uv_timer_p = UnsafeMutablePointer<uv_timer_t>
 

        }
    }
    
    public var repeatTimeout:UInt64 {
        //uv_timer_get_repeat
        get {
            return handle.isNil() ? 0 : uv_timer_get_repeat(handle)
        }
        //uv_timer_set_repeat
        set {
            if !handle.isNil() {
                uv_timer_set_repeat(handle, newValue)
            }
        }
    }

    }
    
    //uv_timer_start
    public func start(timeout:Timeout, repeatTimeout:Timeout? = nil) throws {
        try doWithHandle { handle in
            let repeatTimeout = repeatTimeout ?? .Immediate
            try Error.handle {
                uv_timer_start(handle, timer_cb, timeout.uvTimeout, repeatTimeout.uvTimeout)
            }
        }
    }
