timestamp in 4.8?

Richard P. Williamson richard.williamson at u4eatech.com
Wed Apr 14 02:19:10 PDT 2004


At 16:14 13/04/2004, Dan Nelson wrote:
>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().

Ok, clock_gettime works for me.  

Thanks!

rip




More information about the freebsd-questions mailing list