File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: TCP_SERVER_PORT ;
2
2
use bytesize:: ByteSize ;
3
+ use humantime:: format_duration;
3
4
use simplelog:: * ;
4
5
use std:: rc:: Rc ;
5
6
use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
@@ -229,6 +230,7 @@ pub async fn io_loop(
229
230
. await ?;
230
231
231
232
info ! ( "{} ♾️ Starting to proxy data between TCP and USB..." , NAME ) ;
233
+ let started = Instant :: now ( ) ;
232
234
233
235
// `read` and `write` take owned buffers (more on that later), and
234
236
// there's no "per-socket" buffer, so they actually take `&self`.
@@ -275,6 +277,11 @@ pub async fn io_loop(
275
277
from_stream. abort ( ) ;
276
278
monitor. abort ( ) ;
277
279
280
+ info ! (
281
+ "{} ⌛ session time: {}" ,
282
+ NAME ,
283
+ format_duration( started. elapsed( ) ) . to_string( )
284
+ ) ;
278
285
// stream(s) closed, notify main loop to restart
279
286
need_restart. notify_one ( ) ;
280
287
}
You can’t perform that action at this time.
0 commit comments