1

Each time printk outputs something, a high-resolution time will automatically be showed in a square bracket at the beginning of the line. How does printk get the current time with high resolution? I also wanted to get such a high resolution time in my kernel module code.

xiaokaoy
  • 1,608
  • 3
  • 15
  • 27

1 Answers1

1

You should use getnstimeofday().

John Zwinck
  • 239,568
  • 38
  • 324
  • 436