timestamp in 4.8?

Dan Nelson dnelson at allantgroup.com
Tue Apr 13 08:14:30 PDT 2004


In the last episode (Apr 13), Richard P. Williamson said:
> Is there a reasonable timestamp (that uses a struct timeval
> to return data by preference) in 4.8R?
>
> TSTMP (option KERN_TIMESTAMP) writes the rdtsc clock
> value to debug.timestamps in sysctl-space.  That does
> not suit my purposes (need to timestamp the creation
> of objects which are passed about).

Why not use gettimeofday()?  If you need more precision than
microseconds, you probably can bump up HZ and use clock_gettime().

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list