Skip to content
Snippets Groups Projects
Commit da252f77 authored by Pierre Guilbert's avatar Pierre Guilbert
Browse files

sleep is a GCC function. Changed by boost::this_thread::sleep

parent 20431803
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ int main(int argc, char* argv[]) ...@@ -126,7 +126,7 @@ int main(int argc, char* argv[])
elapsedTimeMeasured = T2 - T1; elapsedTimeMeasured = T2 - T1;
std::cout << "total sent packets : " << sender.packetCount() << std::endl std::cout << "total sent packets : " << sender.packetCount() << std::endl
<<" Elapsed time per packets asked : " << timeToWaitPerPacket << " microseconds" << std::endl <<" Elapsed time per packets asked : " << timeToWaitPerPacket << " microseconds" << std::endl
<<" Elapsed time per packets measured : " << elapsedTimeMeasured * 1e6 / 1000 <<" Elapsed time per packets measured : " << elapsedTimeMeasured
<< " microseconds" << std::endl << " microseconds" << std::endl
<< std::endl; << std::endl;
...@@ -159,7 +159,7 @@ int main(int argc, char* argv[]) ...@@ -159,7 +159,7 @@ int main(int argc, char* argv[])
// NumberPacketsByPool * timeToWait should be greater than 1000 // NumberPacketsByPool * timeToWait should be greater than 1000
if ((sender.packetCount() % NumberPacketsByPool) == 0) if ((sender.packetCount() % NumberPacketsByPool) == 0)
{ {
sleep(NumberPacketsByPool * timeToWaitPerPacket); boost::this_thread::sleep(boost::posix_time::microseconds(NumberPacketsByPool * timeToWaitPerPacket));
} }
} }
} while(loop); } while(loop);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment