amethystate-core 0.9.1

Internal crate for amethystate, not intended for direct use
Documentation
1
2
3
4
5
6
7
8
9
10
use std::path::PathBuf;
use std::time::{SystemTime, UNIX_EPOCH};

pub fn unique_path(suffix: &str) -> PathBuf {
    let nanos = SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .unwrap()
        .as_nanos();
    std::env::temp_dir().join(format!("amethystate-{suffix}-{nanos}.db"))
}