How can I write human readable timestamp in linux kernel? I think do_gettimeofday
returns epoch but I don't want to try to convert it to readable time. I just want a format like Hour:Min:Sec:Msec
.
Thanks
相关问题
- Kernel oops Oops: 80000005 on arm embedded system
- Linux kernel behaviour on heap overrun or stack ov
- Where is the standard kernel libraries to let kern
- What is the difference between /dev/mem, /dev/kmem
- Conditional compilation based on functionality in
相关文章
- How do I get to see DbgPrint output from my kernel
- Enable dynamic debug for multiple files at boot
- Is it possible to run 16 bit code in an operating
- How to arrange a Makefile to compile a kernel modu
- Difference in ABI between x86_64 Linux functions a
- Why are there no debug symbols in my vmlinux when
- Tool to Debug Guest OS in Virtual Box
- ccflag option in Makefile
Though I don't think there's a function for this, you can do it quite easily if you don't need the day.
Note that you get GMT time, not local time.
Later kernels have a function
time_to_tm
to break epoch time into human readable format.Here's an example:
Again, this is only available in later kernels. The second parameter
time_to_tm
is an offset to the epoch time. In my local time is 0, I don't know which one you should use.