Skip to content

Commit

Permalink
Refactor usleep()
Browse files Browse the repository at this point in the history
  • Loading branch information
bvernoux committed Sep 24, 2020
1 parent 84ceacb commit 7c86f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/examples/curvetrace/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int main(int argc, char* argv[])
LogNotice("%5d,%5.3f,",i,v);

//wait 25ms to stabilize
usleep(25 * 1000);
std::this_thread::sleep_for(std::chrono::microseconds(25 * 1000));

LogNotice("%5.7f\n", dmm.GetCurrent());

Expand All @@ -118,7 +118,7 @@ int main(int argc, char* argv[])

//Make sure all writes have committed before we close the socket
psu.GetSerial();
usleep(50 * 1000);
std::this_thread::sleep_for(std::chrono::microseconds(50 * 1000));

return 0;
}

0 comments on commit 7c86f3c

Please sign in to comment.