Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Sat, 5 Aug 2006, Perry E. Metzger wrote:

> Ben Harris <bjh21%netbsd.org@localhost> writes:
> > Clock frequencies tend to be big numbers -- use humanize_number() when
> > displaying them through printf.
> 
> I'm not sure that's a good idea. It is useful to know the exact value
> of the clock.

I was a bit uncertain about this, but if you want all the digits you can 
always ask sysctl:

fastnet:~$ sysctl kern.timecounter.choice
kern.timecounter.choice = iomd_timer0(q=100, f=2000000 Hz) clockinterrupt(q=0, 
f=100 Hz) dummy(q=-1000000, f=1000000 Hz)

In a similar way, we approximate disk capacities when printing them at 
boot time, and assume that anyone who needs the precise number of sectors 
will use disklabel.

-- 
Ben Harris                                                   
<bjh21%NetBSD.org@localhost>
Portmaster, NetBSD/acorn26           <URL:http://www.NetBSD.org/Ports/acorn26/>



Home | Main Index | Thread Index | Old Index