浏览代码

Fixed compilation

Paul-Louis Ageneau 5 年之前
父节点
当前提交
5b2c0cbc08
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      test/benchmark.cpp

+ 4 - 1
test/benchmark.cpp

@@ -93,7 +93,10 @@ size_t benchmark(milliseconds duration) {
 	binary messageData(messageSize);
 	binary messageData(messageSize);
 	fill(messageData.begin(), messageData.end(), byte(0xFF));
 	fill(messageData.begin(), messageData.end(), byte(0xFF));
 	atomic<size_t> receivedSize = 0;
 	atomic<size_t> receivedSize = 0;
-	std::atomic<steady_clock::time_point> startTime, openTime, receivedTime, endTime;
+	std::atomic<steady_clock::time_point> startTime{steady_clock::now()};
+	std::atomic<steady_clock::time_point> openTime{steady_clock::now()};
+	std::atomic<steady_clock::time_point> receivedTime{steady_clock::now()};
+	std::atomic<steady_clock::time_point> endTime{steady_clock::now()};
 
 
 	shared_ptr<DataChannel> dc2;
 	shared_ptr<DataChannel> dc2;
 	pc2->onDataChannel([&dc2, &receivedSize, &receivedTime, &endTime](shared_ptr<DataChannel> dc) {
 	pc2->onDataChannel([&dc2, &receivedSize, &receivedTime, &endTime](shared_ptr<DataChannel> dc) {