use std::time::Duration;
#[derive(clap::Args, Debug, Clone)]
pub struct CommonServerArgs {
#[arg(
long,
default_value = "25",
env = "MICROMEGAS_SHUTDOWN_GRACE_PERIOD_SECONDS"
)]
pub shutdown_grace_period_seconds: u64,
}
impl CommonServerArgs {
pub fn grace(&self) -> Duration {
Duration::from_secs(self.shutdown_grace_period_seconds)
}
}