c - accessing xtime variable Linux kernel -


i implementing system call return current time of day (for learning purpose). have looked @ implementations of gettimeofday() on linux 3.19.2 books checked got current time of day (the wall time) defined in kernel/time/timekeeping.c:

struct timespec xtime; 

[linux kernel development rober love]

however couldn't able xtime variable definition in file.

where xtime variable declared in linux kernel , how can access module or function? what headers should include?

that reference obsolete. recent kernels no longer have xtime. though there still fields in kernel timekeeping structure prefix of xtime_ assume descended it. see, example, struct timekeeper in include/linux/timekeeper_internal.h.

you want stick more stable functions defined in include/linux/timekeeping.h


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -