fingerprint: change parse window from year to day.

This commit is contained in:
Bill Thiede 2023-03-28 19:48:26 -07:00
parent 9fa0d7ad59
commit 2f62ec53d6

View File

@ -16,9 +16,9 @@ use walkdir::WalkDir;
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)] #[command(author, version, about, long_about = None)]
struct Args { struct Args {
/// Number years to search through /// Number days to search through
#[arg(short, long, default_value_t = 1)] #[arg(short, long, default_value_t = 365)]
years: usize, days: i64,
/// Enable verbose logging /// Enable verbose logging
#[arg(short, long, default_value_t = false)] #[arg(short, long, default_value_t = false)]
@ -38,9 +38,8 @@ struct Args {
fn main() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> {
let args = Args::parse(); let args = Args::parse();
let n = 1; // Just check messages from the last N days.
// Just check messages from the last N years. let max_age = 60 * 60 * 24 * args.days;
let max_age = 60 * 60 * 24 * 365 * n;
let start = std::time::Instant::now(); let start = std::time::Instant::now();
let unix_secs = SystemTime::now() let unix_secs = SystemTime::now()
.duration_since(UNIX_EPOCH) .duration_since(UNIX_EPOCH)