lkml.org 
[lkml]   [1999]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: printk
From
Date
"Richard B. Johnson" <root@chaos.analogic.com> writes:

|> Most kernel stuff has 'HZ' granularity so you get 'decimal' information
|> easily like:
|>
|> cpu_time = whatever();
|> printk("CPU = %lu.%lu\n", cpu_time/HZ, cpu_time % HZ);

This gives misleading numbers in the output if HZ != 100. Even if HZ is
100 the output is misleading if cpu_time % HZ < 10.

--
Andreas Schwab "And now for something
SuSE Labs completely different."
schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.042 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site