scope time repo watcher

This commit is contained in:
extrawurst 2022-11-21 17:04:54 +01:00
parent 92f63d107c
commit 8cdb02349f

View File

@ -4,6 +4,7 @@ use notify::{Error, RecommendedWatcher, RecursiveMode};
use notify_debouncer_mini::{
new_debouncer, DebouncedEvent, Debouncer,
};
use scopetime::scope_time;
use std::{
path::Path, sync::mpsc::RecvError, thread, time::Duration,
};
@ -16,6 +17,8 @@ pub struct RepoWatcher {
impl RepoWatcher {
pub fn new(workdir: &str) -> Result<Self> {
scope_time!("RepoWatcher::new");
let (tx, rx) = std::sync::mpsc::channel();
let mut debouncer =