我试图找到一个进程从内核例程开始的时间百分比。问题是我不确定我应该将哪些参数传递给函数:do_posix_clock_monotonic_gettime()
我的意思是什么?
由于
答案 0 :(得分:1)
在Linux 2.6.39上,do_posix_clock_monotomic_gettime
中定义了include/linux/time.h
:
#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
ktime_get_ts在kernel/time/timekeeping.c
中实施。实现上面的评论解释了这个论点:
/**
* ktime_get_ts - get the monotonic clock in timespec format
* @ts: pointer to timespec variable
*
* The function calculates the monotonic clock from the realtime
* clock and the wall_to_monotonic offset and stores the result
* in normalized timespec format in the variable pointed to by @ts.
*/