diff --git a/ctru-rs/src/services/apt.rs b/ctru-rs/src/services/apt.rs index 708ac28..53a0c6d 100644 --- a/ctru-rs/src/services/apt.rs +++ b/ctru-rs/src/services/apt.rs @@ -17,6 +17,17 @@ impl Apt { ::libctru::aptMainLoop() } } + + pub fn set_app_cpu_time_limit(&self, percent: u32) -> ::Result<()> { + unsafe { + let r = ::libctru::APT_SetAppCpuTimeLimit(percent); + if r < 0 { + Err(r.into()) + } else { + Ok(()) + } + } + } } impl Drop for Apt {