summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2025-01-21 03:21:14 -0600
committerLibravatar bigfoot547 <[email protected]>2025-01-21 03:21:14 -0600
commit4baaeb0928876621a0de5fd7eed83539d3f38aa3 (patch)
tree090ca01b35bf2afa15834e042a2e6d3ffc82e373
parentincrease number of concurrent tasks (diff)
random small changes
-rw-r--r--ozone-cli/src/main.rs2
-rw-r--r--src/launcher.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/ozone-cli/src/main.rs b/ozone-cli/src/main.rs
index b811f9a..332b6e7 100644
--- a/ozone-cli/src/main.rs
+++ b/ozone-cli/src/main.rs
@@ -28,7 +28,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
dbg!(&launch);
info!("ok");
- o3launcher::launcher::run_the_game(&launch);
+ o3launcher::launcher::run_the_game(&launch)?;
Ok(())
}
diff --git a/src/launcher.rs b/src/launcher.rs
index 78c429d..348639d 100644
--- a/src/launcher.rs
+++ b/src/launcher.rs
@@ -19,7 +19,7 @@ use std::io::ErrorKind::AlreadyExists;
use std::path::{Component, Path, PathBuf};
use std::{env, process};
use std::env::JoinPathsError;
-use std::time::{SystemTime, UNIX_EPOCH};
+use std::time::{Instant, SystemTime, UNIX_EPOCH};
use const_format::formatcp;
use futures::{StreamExt, TryStreamExt};
use log::{debug, info, warn};
@@ -412,6 +412,7 @@ impl Launcher {
* - launch the game
* - build argument list and whatnot also
*/
+ let start = Instant::now();
let feature_matcher = ProfileFeatureMatcher { profile };
let version_id = profile.get_version();
@@ -585,6 +586,9 @@ impl Launcher {
let jvm_args = profile.iter_arguments().map(OsString::from).chain(runner::build_arguments(&info, ver.as_ref(), ArgumentType::JVM).drain(..)).collect();
let game_args = runner::build_arguments(&info, ver.as_ref(), ArgumentType::Game);
+ let diff = Instant::now().duration_since(start);
+ info!("Finished preparing launch for {} in {:.02} seconds!", ver.id, diff.as_secs_f32());
+
Ok(Launch {
jvm_args,
game_args,