Skip to content

Instantly share code, notes, and snippets.



Last active Sep 7, 2019
What would you like to do?
Rust ticker/timer
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() {
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.