Browse Source

Add apt::set_app_cpu_time_limit

pull/10/head
Fenrir 7 years ago committed by FenrirWolf
parent
commit
d6f52ed12a
  1. 11
      ctru-rs/src/services/apt.rs

11
ctru-rs/src/services/apt.rs

@ -17,6 +17,17 @@ impl Apt {
::libctru::aptMainLoop() ::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 { impl Drop for Apt {

Loading…
Cancel
Save