 
 /// Poll for scanned devices
 internal func PollScannedDevices(_ deviceDescriptor: CInt,
-                                 duration: TimeInterval,
                                  shouldContinueScanning: () -> (Bool),
                                  foundDevice: (Adapter.LowEnergyScannedDevice) -> ()) throws {
     

        
        var foundDevices = [LowEnergyScannedDevice]()
        
        try lowEnergyScan(duration: duration,
                                 filterDuplicates: filterDuplicates,
                                 parameters: parameters,
                                 commandTimeout: timeout,
                                 shouldContinueScanning: { Date() < endDate },

        // macro for enabling / disabling scan
        func enableScan(_ isEnabled: Bool = true) throws {
            
            let scanEnableCommand = LowEnergyCommand.SetScanEnableParameter(enabled: isEnabled,
                                                                            filterDuplicates: filterDuplicates)
            
            do { try deviceRequest(scanEnableCommand, timeout: timeout) }
            catch HCIError.commandDisallowed { /* ignore, means already turned on or off */ }
