Timestamp formatting in Linux kernel

こ雲淡風輕ζ 提交于 2020-02-27 11:29:18

问题


Is there a way to print formatted timestamps within the linux kernel? I have a proc file that displays a series of time related events, and I want to format the timestamps as date/time, honoring timezone, etc.

I have a struct timespec obtained via getnstimeofday(). I want to print the absolute date & time in the current time zone when I generate the content of the proc file.

来源:https://stackoverflow.com/questions/18861164/timestamp-formatting-in-linux-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!