Skip to content

Commit 1f0163b

Browse files
committed
Cleaning up the start time logging for a producer.
1 parent 7f23a0d commit 1f0163b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

sim-lib/src/lib.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -964,17 +964,22 @@ async fn produce_events<N: DestinationGenerator + ?Sized, A: PaymentGenerator +
964964
}
965965

966966
let wait: Duration = if current_count == 0 {
967+
let start = node_generator.payment_start();
968+
if start != Duration::from_secs(0) {
969+
log::debug!(
970+
"Using a start delay. The first payment for {source} will be at {:?}.",
971+
start
972+
);
973+
}
974+
start
975+
} else {
967976
log::debug!(
968-
"Using a start delay. The first payment for {source} will be at {:?} seconds.",
969-
node_generator.payment_start()
977+
"Next payment for {source} in {:?}.",
978+
node_generator.next_payment_wait()
970979
);
971-
node_generator.payment_start()
972-
} else {
973980
node_generator.next_payment_wait()
974981
};
975982

976-
log::debug!("Next payment for {source} in {:?} seconds.", wait);
977-
978983
select! {
979984
biased;
980985
_ = listener.clone() => {

0 commit comments

Comments
 (0)