I have included linux/thie.h
and used do_gettimeofday()
to get the time in seconds in integer type.
But I want to convert the result of seconds, minutes, hours to char*
type.
How can I do this?
Btw, I can't include stdlib.h
then use itoa()
to convert.
I can read the result in the kernel by using the command dmesg now. But I want to show the result in console by tty and I can only get string from kernel. How can I get the time information(it is variable) from kernel to console.