Skip to content

Commit b60b932

Browse files
committed
Add GameControllerBarcodeParserTests to test scanDuration tracking
1 parent 6831645 commit b60b932

File tree

3 files changed

+110
-41
lines changed

3 files changed

+110
-41
lines changed

WooCommerce/Classes/POS/Presentation/Barcode Scanning/GameControllerBarcodeParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ final class GameControllerBarcodeParser {
190190

191191
private func calculateScanDurationMs() -> Int {
192192
guard let startTime = scanStartTime else { return 0 }
193-
return Int(timeProvider.now().timeIntervalSince(startTime) * 1000)
193+
return Int(round(timeProvider.now().timeIntervalSince(startTime) * 1000))
194194
}
195195

196196
private func processScan() {

0 commit comments

Comments
 (0)