<meta http-equiv="content-type" content="text/html; charset=utf-8">No I don't have commit access. So please do it for me.<div><br></div><div>Thank you.</div><div>Marco</div><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 12:12 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Looks good. Marco, do you have commit access? If so, commit when you get the chance. Else I will do so on your behalf.<br>

<br>
Greg Clayton<br>
<div><div></div><div class="h5"><br>
On Apr 6, 2011, at 1:44 PM, Marco Minutoli wrote:<br>
<br>
> NSEC_PER_SEC is not defined in sys/time.h on Linux. I have replaced<br>
> that macro with a static constant inside TimeValue.<br>
> ---<br>
> include/lldb/Host/TimeValue.h                      |    2 ++<br>
> .../gdb-remote/GDBRemoteCommunicationClient.cpp    |   12 ++++++------<br>
> 2 files changed, 8 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/include/lldb/Host/TimeValue.h b/include/lldb/Host/TimeValue.h<br>
> index 81d1aed..04b6015 100644<br>
> --- a/include/lldb/Host/TimeValue.h<br>
> +++ b/include/lldb/Host/TimeValue.h<br>
> @@ -29,6 +29,8 @@ namespace lldb_private {<br>
> class TimeValue<br>
> {<br>
> public:<br>
> +    static const uint32_t NanoSecondPerSecond = 1000000000U;<br>
> +<br>
>     //------------------------------------------------------------------<br>
>     // Constructors and Destructors<br>
>     //------------------------------------------------------------------<br>
> diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp<br>
> index d0198a0..7ad3d44 100644<br>
> --- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp<br>
> +++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp<br>
> @@ -1385,13 +1385,13 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)<br>
>                 }<br>
>                 end_time = TimeValue::Now();<br>
>                 total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();<br>
> -                packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)NSEC_PER_SEC;<br>
> +                packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecondPerSecond;<br>
>                 printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %llu.%09.9llu sec for %f packets/sec.\n",<br>
>                         num_packets,<br>
>                         send_size,<br>
>                         recv_size,<br>
> -                        total_time_nsec / NSEC_PER_SEC,<br>
> -                        total_time_nsec % NSEC_PER_SEC,<br>
> +                        total_time_nsec / TimeValue::NanoSecondPerSecond,<br>
> +                        total_time_nsec % TimeValue::NanoSecondPerSecond,<br>
>                         packets_per_second);<br>
>                 if (recv_size == 0)<br>
>                     recv_size = 32;<br>
> @@ -1409,11 +1409,11 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)<br>
>         }<br>
>         end_time = TimeValue::Now();<br>
>         total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();<br>
> -        packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)NSEC_PER_SEC;<br>
> +        packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecondPerSecond;<br>
>         printf ("%u 'qC' packets packets in 0x%llu%09.9llu sec for %f packets/sec.\n",<br>
>                 num_packets,<br>
> -                total_time_nsec / NSEC_PER_SEC,<br>
> -                total_time_nsec % NSEC_PER_SEC,<br>
> +                total_time_nsec / TimeValue::NanoSecondPerSecond,<br>
> +                total_time_nsec % TimeValue::NanoSecondPerSecond,<br>
>                 packets_per_second);<br>
>     }<br>
> }<br>
> --<br>
> 1.7.1<br>
><br>
</div></div>> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Marco Minutoli<br><br>"If A is success in life, then A equals x plus y plus z. Work is x;<br>y is play; and z is keeping your mouth shut." --A. Einstein<br>