You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
amethyst/src/internal/strings.rs

23 lines
455 B
Rust

3 years ago
use std::process::exit;
use std::time::UNIX_EPOCH;
3 years ago
pub fn info(a: String) {
println!("\x1b[2;22;35m❖\x1b[0m \x1b[1;37m{}\x1b[0m", a)
}
pub fn crash(a: String, b: i32) {
println!("\x1b[2;22;31m❌\x1b[0m \x1b[1;91m{}\x1b[0m", a);
exit(b);
}
pub fn log(a: String) {
eprintln!(
"{} {}",
std::time::SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs(),
a
);
}