diff --git a/Sources/WebDriver/Poll.swift b/Sources/WebDriver/Poll.swift index c397200..813a9e9 100644 --- a/Sources/WebDriver/Poll.swift +++ b/Sources/WebDriver/Poll.swift @@ -5,7 +5,7 @@ import struct Dispatch.DispatchTime /// Calls a closure repeatedly with exponential backoff until it reports success or a timeout elapses. /// Thrown errors bubble up immediately, returned errors allow retries. /// - Returns: The successful value. -internal func poll( +public func poll( timeout: TimeInterval, initialPeriod: TimeInterval = 0.001, work: () throws -> Result) throws -> Value { @@ -33,7 +33,7 @@ internal func poll( /// Calls a closure repeatedly with exponential backoff until it reports success or a timeout elapses. /// - Returns: Whether the closure reported success within the expected time. -internal func poll( +public func poll( timeout: TimeInterval, initialPeriod: TimeInterval = 0.001, work: () throws -> Bool) throws -> Bool {