Skip to content

Instantly share code, notes, and snippets.

@gbmor gbmor/ticker.rs
Last active Sep 7, 2019

Embed
What would you like to do?
Rust ticker/timer
#![macro_use]
extern crate crossbeam_channel;
use std::time;
pub fn cache_ticker() {
let ticker = crossbeam_channel::tick(time::Duration::from_millis(60000));
loop {
select! {
recv(ticker) -> _ => do_something(),
}
}
}
fn do_something() {
unimplemented!();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.