Debian Codegraph @

doc/tutorial/timer-jiffies.stp

raw
1 global count_jiffies, count_ms
2 probe timer.jiffies(100) { count_jiffies ++ }
3 probe timer.ms(100) { count_ms ++ }
4 probe timer.ms(12345)
5 {
6 hz=(1000*count_jiffies) / count_ms
7 printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n",
8 count_jiffies, count_ms, hz)
9 exit ()
10 }