disable stat on server if param <=0

This commit is contained in:
AleaJactaEst 2023-10-26 23:30:45 +02:00
parent 93fc0f44b2
commit eefefb5596

View file

@ -608,7 +608,7 @@ impl Statistics {
self.send_remove += 1;
}
pub fn is_completed(&self, maxsecond:u64) -> bool {
self.last.elapsed().as_secs() > maxsecond
self.last.elapsed().as_secs() > maxsecond && maxsecond > 0
}
}
@ -657,7 +657,7 @@ struct Cli {
#[arg(short, long)]
verbose: bool,
/// Delay on each statistics (in second)
/// Delay on each statistics (in second) [0 = no stat]
#[arg(short, long, default_value_t = 60)]
statistics: u64,