diff options
author | Rémy Raes <contact@remyraes.com> | 2023-03-22 21:46:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 20:46:12 +0000 |
commit | 5e096f84e59eae0ed6b7bb758149c491c87538a6 (patch) | |
tree | 521db07bc7f1cd1420e6a9687b3bc9ee21ce328b /src-tauri/src/constants.rs | |
parent | 423775e903dfe630ad9af2f1dacdd1a1729023ae (diff) | |
download | FlightCore-5e096f84e59eae0ed6b7bb758149c491c87538a6.tar.gz FlightCore-5e096f84e59eae0ed6b7bb758149c491c87538a6.zip |
feat: Refresh statistics (#228)
* feat: fetch stats every 5 minutes and ping front with received information
* feat: update front on stats reception
* style: format code
* fix: Add comment
---------
Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Diffstat (limited to 'src-tauri/src/constants.rs')
-rw-r--r-- | src-tauri/src/constants.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src-tauri/src/constants.rs b/src-tauri/src/constants.rs index 57a10e02..7b13206a 100644 --- a/src-tauri/src/constants.rs +++ b/src-tauri/src/constants.rs @@ -1,6 +1,6 @@ // This file stores various global constants values - use const_format::concatcp; +use std::time::Duration; // FlightCore user agent for web requests pub const APP_USER_AGENT: &str = concatcp!("FlightCore/", env!("CARGO_PKG_VERSION")); @@ -34,3 +34,6 @@ pub const PULLS_API_ENDPOINT_LAUNCHER: &str = "https://api.github.com/repos/R2Northstar/NorthstarLauncher/pulls"; pub const PULLS_API_ENDPOINT_MODS: &str = "https://api.github.com/repos/R2Northstar/NorthstarMods/pulls"; + +// Statistics (players and servers counts) refresh delay +pub const REFRESH_DELAY: Duration = Duration::from_secs(5 * 60); |