tempest 0.1.1

Realtime message handling framework inspired by Apache Storm and built with Actix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::time::{SystemTime, UNIX_EPOCH};

/// A common function for returning the current milliseconds
/// since epoch
pub fn now_millis() -> usize {
    match SystemTime::now().duration_since(UNIX_EPOCH) {
        Ok(n) => n.as_millis() as usize,
        Err(_) => 0,
    }
}

/// Re-export logging functions
pub mod logger {
    pub use log::{debug, error, info, log, trace, warn};
}