Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 60a07cfe6444
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a6d02e8c87ca
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 23, 2020

  1. Copy the full SHA
    776cedd View commit details
  2. Merge pull request #263 from bvernoux/usleep_changes

    Replace usleep(..) by std::this_thread::sleep_for(std::chrono::microseconds(..)) see PR #262
    azonenberg authored Sep 23, 2020
    Copy the full SHA
    a6d02e8 View commit details
Showing with 4 additions and 2 deletions.
  1. +1 −1 scopehal/Oscilloscope.cpp
  2. +1 −1 scopehal/SignalGeneratorOscilloscope.cpp
  3. +2 −0 scopehal/scopehal.h
2 changes: 1 addition & 1 deletion scopehal/Oscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -149,7 +149,7 @@ bool Oscilloscope::WaitForTrigger(int timeout)
{
if(HasPendingWaveforms())
return true;
usleep(10 * 1000);
std::this_thread::sleep_for(std::chrono::microseconds(10 * 1000));
}

return false;
2 changes: 1 addition & 1 deletion scopehal/SignalGeneratorOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ Oscilloscope::TriggerMode SignalGeneratorOscilloscope::PollTrigger()
bool SignalGeneratorOscilloscope::AcquireData()
{
//cap waveform rate at 25 wfm/s to avoid saturating cpu etc with channel emulation
usleep(40 * 1000);
std::this_thread::sleep_for(std::chrono::microseconds(40 * 1000));

auto waveform = m_bufmodel->SimulatePRBS(
rand(),
2 changes: 2 additions & 0 deletions scopehal/scopehal.h
Original file line number Diff line number Diff line change
@@ -40,6 +40,8 @@
#include <string>
#include <map>
#include <stdint.h>
#include <chrono>
#include <thread>

#include <sigc++/sigc++.h>
#include <cairomm/context.h>