Hi,

On 12 October 2017 at 13:13, Emre Ucan <[email protected]> wrote:
> +WL_EXPORT char *
> +weston_debug_scope_timestamp(struct weston_debug_scope *scope,
> +                            char *buf, size_t len)
> +{
> +       struct timeval tv;
> +       struct tm *bdt;
> +       char string[128];
> +       size_t ret = 0;
> +
> +       gettimeofday(&tv, NULL);
> +
> +       bdt = localtime(&tv.tv_sec);
> +       if (bdt)
> +               ret = strftime(string, sizeof string,
> +                              "%Y-%m-%d %H:%M:%S", bdt);
> +
> +       if (ret > 0)
> +               snprintf(buf, len, "[%s.%03ld][%s]", string,
> +                        tv.tv_usec / 1000, scope->name);
> +       else
> +               snprintf(buf, len, "[?][%s]", scope->name);

I would very much not like to see formatted time in the debug scopes.
Can we please just use a raw microsecond value? Ultimately I would
like to see tools parse these files, but trying to parse formatted
times is a nightmare.

Cheers,
Daniel
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to