[PATCH] Prepend timestamp in msgbuf

Ed Schouten ed at 80386.nl
Mon Oct 17 22:23:00 UTC 2011


Ah, missed something.

> +		getnanouptime(&ts);
> +		err = snprintf(buf, sizeof buf, "[%zd.%.6ld] ",
> +		    ts.tv_sec, ts.tv_nsec / 1000);

It seems we also have a getmicrouptime(), which returns a struct
timeval. Also a more general question: is it actually safe to call
getnanouptime() here? This code gets executed from an arbitrary context,
right?

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20111017/b7bbb0f8/attachment.pgp


More information about the freebsd-current mailing list