diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/launcher.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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, |
