From 9a7a96d1f2488638560ac4730636f97681750aa6 Mon Sep 17 00:00:00 2001 From: Tien Do Nam Date: Sat, 2 Nov 2024 20:36:42 +0100 Subject: [PATCH] style: remove unused stopwatch --- rhttp/lib/src/util/stream_listener.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/rhttp/lib/src/util/stream_listener.dart b/rhttp/lib/src/util/stream_listener.dart index f75c4e8..cb10050 100644 --- a/rhttp/lib/src/util/stream_listener.dart +++ b/rhttp/lib/src/util/stream_listener.dart @@ -9,14 +9,11 @@ Future listenToStreamWithBackpressure({ required Future Function(Uint8List) onData, required Future Function() onDone, }) async { - final stopWatch = Stopwatch()..start(); - final bytesBuilder = BytesBuilder(copy: false); await for (final chunk in stream) { bytesBuilder.add(chunk); if (bytesBuilder.length > _bufferSize) { - stopWatch.reset(); await onData(bytesBuilder.takeBytes()); } }