Lines Matching refs:watcher
61 // step1: construct a mut watcher.
62 let watcher = Watcher::new(|record: HiSysEventRecord| {
66 }).expect("Construct a watcher by Watcher::new");
67 // step2: add this watcher.
68 let mut ret = hisysevent::add_watcher(&watcher, &watch_rules);
84 // step3: remove this watcher.
85 ret = hisysevent::remove_watcher(&watcher);
87 // step4: recycle allocated memories of this watcher.
88 watcher.try_to_recycle();
89 ret = hisysevent::add_watcher(&watcher, &watch_rules);