MCPcopy Create free account
hub / github.com/dfinity/orbit / initialize_rng_timer

Method initialize_rng_timer

core/station/impl/src/services/system.rs:305–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303 #[cfg(target_arch = "wasm32")]
304 fn install_canister_post_process(&self, system_info: SystemInfo, install: SystemInstall) {
305 async fn initialize_rng_timer() {
306 use orbit_essentials::utils::initialize_rng;
307 if let Err(e) = initialize_rng().await {
308 ic_cdk::print(format!("initializing rng failed: {e}"));
309 crate::core::ic_timers::set_timer(std::time::Duration::from_secs(60), move || {
310 use crate::core::ic_cdk::spawn;
311 spawn(initialize_rng_timer())
312 });
313 }
314 }
315
316 crate::core::ic_timers::set_timer(std::time::Duration::from_millis(0), move || {
317 use crate::core::ic_cdk::spawn;

Callers

nothing calls this directly

Calls 5

initialize_rngFunction · 0.85
printFunction · 0.85
set_timerFunction · 0.85
spawnFunction · 0.85
initialize_rng_timerFunction · 0.85

Tested by

no test coverage detected