{"id":62393,"library":"timer","title":"Timer","description":"A simple timer. Use it to schedule execution of closures after a delay or at a given timestamp.","status":"active","version":"0.2.0","language":"rust","source_language":null,"source_url":"https://github.com/Yoric/timer.rs","tags":["timer","scheduling","delay","timeout","async"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ntimer = \"0.2.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add timer","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Timer","correct":"use timer::Timer;"}],"quickstart":{"code":"use timer::Timer;\n\nlet timer = Timer::new();\nlet guard = timer.schedule_with_delay(std::time::Duration::from_secs(5), || {\n    println!(\"5 seconds passed\");\n});\n// guard keeps the timer alive","lang":"rust","description":"Scheduling a closure to run after a 5-second delay."},"warnings":[{"fix":"Run the timer in a tokio runtime or use the `timer` crate's own event loop","message":"Timer requires an active event loop (e.g., from tokio or async-std)","severity":"gotcha","affected_versions":">=0.2.0"}],"env_vars":null,"search_vec":"'async':24 'closur':11 'delay':14,22 'execut':9 'given':18 'schedul':8,21 'simpl':3 'timeout':23 'timer':1,4,20 'timestamp':19 'use':5","created_at":"2026-06-17T16:29:15.554381+00:00","updated_at":"2026-06-17T16:29:15.554381+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Yoric/timer.rs","github":"https://github.com/Yoric/timer.rs","docs":"https://docs.rs/timer/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["async","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}