         return data
     }
 
-    public func flush(deadline: Deadline = never) throws {
-        try assertNotClosed()
-        fileflush(file, deadline)
+    public func flush(deadline: Double = .never) throws {
+        try assertNotClosed()
+        fileflush(file, deadline.int64milliseconds)
         try FileError.assertNoError()
     }
 

        }
	}

    public func read(length length: Int, deadline: Deadline = never) throws -> Data {
        try assertNotClosed()

        var data = Data.bufferWithSize(length)
        let bytesProcessed = data.withUnsafeMutableBufferPointer {
            fileread(file, $0.baseAddress, $0.count, deadline)
        }

        try FileError.assertNoReceiveErrorWithData(data, bytesProcessed: bytesProcessed)
        return Data(data.prefix(bytesProcessed))
    }

    public func read(lowWaterMark lowWaterMark: Int, highWaterMark: Int, deadline: Deadline = never) throws -> Data {
        try assertNotClosed()

        var data = Data.bufferWithSize(highWaterMark)
        let bytesProcessed = data.withUnsafeMutableBufferPointer {
            filereadlh(file, $0.baseAddress, lowWaterMark, highWaterMark, deadline)
        }

        try FileError.assertNoReceiveErrorWithData(data, bytesProcessed: bytesProcessed)
        return Data(data.prefix(bytesProcessed))
    }

    public func read(deadline deadline: Deadline = never) throws -> Data {
        var data = Data()

        while true {

}

extension File {
    public func write(convertible: DataConvertible, flush: Bool = true, deadline: Double = .never) throws {
        try write(convertible.data, flush: flush, deadline: deadline)
    }
}
