replaced usleep with sleep_for

This commit is contained in:
Erik Frojdh
2020-07-23 11:07:42 +02:00
parent 9ea8882c05
commit 78a6896ae9
4 changed files with 16 additions and 8 deletions

View File

@ -15,6 +15,8 @@
#include <bitset>
#include <cassert>
#include <cmath>
#include <chrono>
#include <thread>
#include <cstdlib>
#include <iomanip>
#include <iterator>
@ -3160,7 +3162,7 @@ void Module::programFPGAviaBlackfin(std::vector<char> buffer) {
const int ERASE_TIME = 65;
int count = ERASE_TIME + 1;
while (count > 0) {
usleep(1 * 1000 * 1000);
std::this_thread::sleep_for(std::chrono::seconds(1));
--count;
printf(
"%d%%\r",