On Thu, Aug 28, 2014 at 10:52 AM, Kendrick, Stuart
<[email protected]> wrote:
> How else might I print a timestamp, other than using ‘printf … walltimestamp’?
>
> I’m running dtrace on a platform (modified version of FreeBSD 7) where 
> ‘printf %Y’ only ever returns the one timestamp:  1969 Dec 31 18:00:00
>
> So I’m casting around for another approach:  suggestions?

Do you need wall clock time, or do you just need relative timestamps
to other dtrace prints?  timestamp works in all FreeBSD versions and
you can print it as a simple int.  The counter is given in nanoseconds
(I believe that it's specifically the number of nanoseconds since
boot, but don't quote me on that).

Alternatively, the code to implement walltimestamp was quite simple,
so you could investigate back-porting that:

http://svn.freebsd.org/changeset/base/238537
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
To unsubscribe, send any mail to "[email protected]"

Reply via email to