notable restructuring
This commit is contained in:
parent
4c1af97760
commit
320b0d348d
43 changed files with 154 additions and 142 deletions
29
examples/parse_vcd.rs
Normal file
29
examples/parse_vcd.rs
Normal file
|
@ -0,0 +1,29 @@
|
|||
use clap::Parser;
|
||||
use std::fs::File;
|
||||
|
||||
use fastwave::*;
|
||||
|
||||
use num::{BigUint};
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Cli {
|
||||
/// The path to the file to read
|
||||
#[clap(parse(from_os_str))]
|
||||
path: std::path::PathBuf,
|
||||
}
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let args = Cli::parse();
|
||||
|
||||
use std::time::Instant;
|
||||
|
||||
let now = Instant::now();
|
||||
let file = File::open(&args.path)?;
|
||||
let vcd = parse_vcd(file).unwrap();
|
||||
let elapsed = now.elapsed();
|
||||
|
||||
println!("Parsed VCD file {} : {:.2?}", &args.path.as_os_str().to_str().unwrap(), elapsed);
|
||||
|
||||
|
||||
Ok(())
|
||||
}
|
Reference in a new issue