From 85c63c2ca8448428e2db93cb9d4f284a4e314ed7 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Mon, 4 Mar 2024 21:59:50 +0100 Subject: #20. Set offset manually through config --- src/config.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 58043c2..9605361 100644 --- a/src/config.rs +++ b/src/config.rs @@ -8,6 +8,7 @@ pub struct Config { pub serveraddr: String, pub pingtimeout: i64, pub pingthreshold: i64, + pub timeoffset: i8, } impl Config { @@ -16,6 +17,7 @@ impl Config { .set_default("serveraddr", "0.0.0.0:7229")? .set_default("pingtimeout", 10)? .set_default("pingthreshold", 1)? + .set_default("timeoffset", 0)? .add_source(File::with_name("config.toml").required(false)) .add_source(File::with_name("config.dev.toml").required(false)) .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_")) -- cgit v1.2.3