时间子系统9_timekeeper初始化

//Timekeeping
//	Timekeeping子系统负责更新xtime, 调整误差, 及提供get/settimeofday接口.
//Times in Kernel
//kernel的time基本类型:
//	1) system time
//		A monotonically increasing value that represents the amount of time the system has been running. 
//		单调增长的系统运行时间, 可以通过time source, xtime及wall_to_monotonic计算出来.
//	2) wall time
//		A value representing the the human time of day, as seen on a wrist-watch. Realtime时间: xtime.
//	3) time source
//		A representation of a free running counter running at a known frequency, usually in hardware, e.g GPT. 
//		可以通过clocksource->read()得到counter值
//	4) tick
//		A periodic interrupt generated by a hardware-timer, typically with a fixed interval defined by HZ: jiffies
//	这些time之间互相关联, 互相可以转换:
//		system_time = xtime + cyc2ns(clock->read() - clock->cycle_last) + wall_to_monotonic;
//		real_time = xtime + cyc2ns(clock->read() - clock->cycle_last)
//		也就是说real time是从1970年开始到现在的nanosecond, 而system time是系统启动到现在的


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部