diff options
author | Stephen Wilson <wilsons@start.ca> | 2011-04-07 10:27:22 +0000 |
---|---|---|
committer | Stephen Wilson <wilsons@start.ca> | 2011-04-07 10:27:22 +0000 |
commit | f6e259049dab79b42142853f51af06eb8e222de7 (patch) | |
tree | c61798e8f52f42189d6785b11cb1193e1dbe3a36 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 78709173d2e2057db1fa6956ce24c16d581a8729 (diff) | |
download | bcm5719-llvm-f6e259049dab79b42142853f51af06eb8e222de7.tar.gz bcm5719-llvm-f6e259049dab79b42142853f51af06eb8e222de7.zip |
Removed use of NSEC_PER_SEC.
NSEC_PER_SEC is not defined in sys/time.h on Linux. Replaced that macro with a
static constant inside TimeValue.
Patch by Marco Minutoli.
llvm-svn: 129071
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index d0198a0db09..7ad3d444969 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1385,13 +1385,13 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets) } end_time = TimeValue::Now(); total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970(); - packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)NSEC_PER_SEC; + packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecondPerSecond; printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %llu.%09.9llu sec for %f packets/sec.\n", num_packets, send_size, recv_size, - total_time_nsec / NSEC_PER_SEC, - total_time_nsec % NSEC_PER_SEC, + total_time_nsec / TimeValue::NanoSecondPerSecond, + total_time_nsec % TimeValue::NanoSecondPerSecond, packets_per_second); if (recv_size == 0) recv_size = 32; @@ -1409,11 +1409,11 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets) } end_time = TimeValue::Now(); total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970(); - packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)NSEC_PER_SEC; + packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecondPerSecond; printf ("%u 'qC' packets packets in 0x%llu%09.9llu sec for %f packets/sec.\n", num_packets, - total_time_nsec / NSEC_PER_SEC, - total_time_nsec % NSEC_PER_SEC, + total_time_nsec / TimeValue::NanoSecondPerSecond, + total_time_nsec % TimeValue::NanoSecondPerSecond, packets_per_second); } } |