static Function<RxBleInternalScanResult, RxBleInternalScanResult> toMatchLost() {
        return new Function<RxBleInternalScanResult, RxBleInternalScanResult>() {
            @Override
            public RxBleInternalScanResult apply(RxBleInternalScanResult rxBleInternalScanResult) {
                return new RxBleInternalScanResult(
                        rxBleInternalScanResult.getBluetoothDevice(),
                        rxBleInternalScanResult.getRssi(),
                        rxBleInternalScanResult.getTimestampNanos(),
                        rxBleInternalScanResult.getScanRecord(),
                        ScanCallbackType.CALLBACK_TYPE_MATCH_LOST,
                        rxBleInternalScanResult.isConnectable(),
                        rxBleInternalScanResult.getAdvertisingSid()
                );
            }
        };
    }
A convenience method for running a scan for a period of time and repeat in five seconds intervals.

@param windowInMillis window for which the observable should be active
@return Observable.Transformer that will take the original observable for specific time and repeat subscription after 5 seconds
rxandroidble/src/main/java/com/polidea/rxandroidble2/internal/scan/ScanSettingsEmulator.java