b799a9955f
Adds copious docs and reorganizes the code a little bit. Ready for final release, hopefully.
23 lines
513 B
Rust
23 lines
513 B
Rust
use std::time::Instant;
|
|
|
|
use julid::Julid;
|
|
|
|
fn main() {
|
|
let mut v = Vec::with_capacity(2000);
|
|
let start = Instant::now();
|
|
for _ in 0..2000 {
|
|
v.push(Julid::new());
|
|
}
|
|
let end = Instant::now();
|
|
let dur = (end - start).as_micros();
|
|
|
|
for id in v.iter() {
|
|
println!(
|
|
"{id}: created_at {}; counter: {}; sortable: {}",
|
|
id.created_at(),
|
|
id.counter(),
|
|
id.sortable()
|
|
);
|
|
}
|
|
println!("2000 IDs generated in {dur}us");
|
|
}
|