10000 GitHub - rot256/hjul: Simple and efficient timer library, build directly on top of mio
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ hjul Public

Simple and efficient timer library, build directly on top of mio

Notifications You must be signed in to change notification settings

rot256/hjul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Rust CI Status Beta Rust CI Status Nightly Rust CI Status

Hjul

Hjul is a thin wrapper around mio-extra timers. Example usage:

use hjul::Runner;
use std::thread;
use std::time::Duration;

let runner = Runner::new(Duration::from_millis(100), 100, 1024);
let timer = runner.timer(|| println!("fired"));

timer.start(Duration::from_millis(200));

// wait for timer to fire
thread::sleep(Duration::from_millis(500));

// start the timer again
timer.start(Duration::from_millis(200));

// stop timer immediately
timer.stop();

// start the timer again
timer.start(Duration::from_millis(200));

// timer is stopped when it goes out of scope

Full documentation at docs.rs/hjul

About

Simple and efficient timer library, build directly on top of mio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0