RFR: 8254270: linux 32 bit build doesn't compile libjdwp/log_messages.c [v3]

Coleen Phillimore coleenp at openjdk.java.net
Fri Nov 6 12:00:57 UTC 2020


On Fri, 6 Nov 2020 01:01:40 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> char tmp[10 + 1];
>>     snprintf(tmp, sizeof(tmp), "%.3d", millisecs);
>>     snprintf(tbuf, ltbuf, "%s.%s %s", timestamp_date_time, tmp, timestamp_timezone);
>> This also gets the same thing.
>
> The concern is when it is less than 100ms.

unsigned millisecs[] = { 2, 20, 200, 1000 };
  get_time_stamp(millisecs[i], buf, sizeof(buf));

gets:

timestamp 06.11.2020 06:56:08.002 EST
timestamp 06.11.2020 06:56:08.020 EST
timestamp 06.11.2020 06:56:08.200 EST
timestamp 06.11.2020 06:56:08.1000 EST

with

    char tmp[10 + 1];
    snprintf(tmp, sizeof(tmp), "%.3d", millisecs);
    snprintf(tbuf, ltbuf, "%s.%s %s", timestamp_date_time, tmp, timestamp_timezone);

Is this what you want?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1067


More information about the serviceability-dev mailing list