[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH] ntdll: provide a timestamp debug channel, which prints a
From:       Bernhard Loos <bernhardloos () googlemail ! com>
Date:       2011-08-31 11:02:02
Message-ID: CAOB12PXr2HWZmROqsuu6NOjtc542h3vffSEgvyCRO00W2wrJGw () mail ! gmail ! com
[Download RAW message or body]

On Wed, Aug 31, 2011 at 12:20 PM, Alexandre Julliard
<julliard@winehq.org> wrote:
> Bernhard Loos <bernhardloos@googlemail.com> writes:
>
>> @@ -164,8 +165,16 @@ static int NTDLL_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_chan
>>      /* only print header if we are at the beginning of the line */
>>      if (info->out_pos == info->output || info->out_pos[-1] == '\n')
>>      {
>> +        if (TRACE_ON(timestamp))
>> +        {
>> +            LARGE_INTEGER now;
>> +            extern timeout_t server_start_time;
>
> Don't add extern statements all over the place, there are functions to
> return tick counts.
Found NtGetTickCount, after some looking around which does what I need.
In my defence, I the kernel32 version of GetTickCount also calls
NtQuerySystemTime, so it never occured to me, that there might be one
in ntdll.

> Also you probably want a more readable formatting.
I'm not exactly sure, how to make it more readable. I could add a .
after seconds and ms at the end, but this makes it more likely to
create line wraps, which also hurts readability and it's not that hard
to figure out.


> --
> Alexandre Julliard
> julliard@winehq.org
>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic