aquatic-crawler/src/debug.rs
2025-06-07 17:46:58 +03:00

14 lines
298 B
Rust

pub fn error(e: &anyhow::Error) {
eprintln!("[{}] [error] {e}", now())
}
pub fn info(message: String) {
eprintln!("[{}] [info] {message}", now())
}
fn now() -> u128 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_millis()
}