Skip to content

Commit 03d3ac2

Browse files
committed
main: start_time can be entirely internal to run()
We only need this set before we run the transport loop. Signed-off-by: Jeremy Kerr <[email protected]>
1 parent 0c8dbd7 commit 03d3ac2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ async fn run(
103103
mut transport: Transport,
104104
mut port: Port<'_>,
105105
router: &Router<'_>,
106-
start_time: Instant,
107106
) -> std::io::Result<()> {
108107
let portid = PortId(0);
108+
let start_time = Instant::now();
109109
loop {
110110
select!(
111111
r = transport.recv().fuse() => {
@@ -279,7 +279,7 @@ fn main() -> Result<()> {
279279
smol::block_on(async {
280280
select!(
281281
_ = fut.fuse() => (),
282-
_ = run(transport, port, &router, Instant::now()).fuse() => (),
282+
_ = run(transport, port, &router).fuse() => (),
283283
_ = control(&router, ctrl_ev_tx).fuse() => (),
284284
_ = nvme_mi(&router).fuse() => (),
285285
_ = pldm::pldm(&router, ctrl_ev_rx).fuse() => (),

0 commit comments

Comments
 (0)