From 4baaeb0928876621a0de5fd7eed83539d3f38aa3 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Tue, 21 Jan 2025 03:21:14 -0600 Subject: random small changes --- ozone-cli/src/main.rs | 2 +- src/launcher.rs | 6 +++++- 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> { 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, -- cgit v1.2.3-70-g09d2