summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzy <[email protected]>2023-11-08 11:50:35 +0800
committerzy <[email protected]>2023-11-08 11:50:35 +0800
commita45b2f21f9b1adfe3d9a36bc3312017fb67955af (patch)
treeab799ee7d101b0ec4b7e570cd3651e7e1eddc876
parent0a31294ff30e6724763056b5452c5f1f899bcd7c (diff)
add common
-rw-r--r--watch_module_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/watch_module_lib.c b/watch_module_lib.c
index a62eb1f..4783c90 100644
--- a/watch_module_lib.c
+++ b/watch_module_lib.c
@@ -83,7 +83,9 @@ int start_hwTimer(unsigned long timeout)
printk("HWTimer Start\n");
kt = ktime_set(0, (unsigned long)timeout * US2NS); // us -> ns
- hrtimer_init(&hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ // CLOCK_MONOTONIC: time since boot | HRTIMER_MODE_REL : relative time
+ hrtimer_init(&hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ // mode the same as hrtimer_init
hrtimer_start(&hr_timer, kt, HRTIMER_MODE_REL);
hr_timer.function = hrtimer_hander;
return 0;