Re: [PATCH] Prepend timestamp in msgbuf

From: Ed Schouten <ed_at_80386.nl>
Date: Tue, 18 Oct 2011 00:22:59 +0200
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/

Received on Mon Oct 17 2011 - 20:23:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC