Skip to content

Commit 66e4d0e

Browse files
committed
main: show terminating info and running time
1 parent af6254f commit 66e4d0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use std::sync::Arc;
1818
use std::time::Duration;
1919
use tokio::runtime::Builder;
2020
use tokio::sync::Notify;
21+
use tokio::time::Instant;
2122

2223
// module name for logging engine
2324
const NAME: &str = "<i><bright-black> main: </>";
@@ -153,6 +154,7 @@ async fn tokio_main(
153154
}
154155

155156
fn main() {
157+
let started = Instant::now();
156158
let args = Args::parse();
157159
logging_init(args.debug, &args.logfile);
158160

@@ -209,4 +211,9 @@ fn main() {
209211
need_restart_cloned,
210212
tcp_start_cloned,
211213
));
214+
215+
info!(
216+
"🚩 aa-proxy-rs terminated, running time: {}",
217+
format_duration(started.elapsed()).to_string()
218+
);
212219
}

0 commit comments

Comments
 (0)