Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add Windows support #86

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
80 standard time (#1)
* Update gitignore.

* Removed nanosleep. (fixes #80)
soroshsabz authored Feb 24, 2023
commit 6cf8af687b008612ae81f78912a83c5230c32349
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@

#include <iostream>
#include <sstream>
#include <chrono>
#include <thread>
#include <signal.h>
#include "main.h"
#include "commands.h"
@@ -459,10 +461,8 @@ bool Manager::SendDTMF(const PString &dtmf)
// sleep a while
std::cout << "sent DTMF: [" << dtmf[i] << "]" << std::endl;

struct timespec tp;
tp.tv_sec = 0;
tp.tv_nsec = 500 * 1000 * 1000; // half a second
nanosleep (&tp, 0);
using namespace std::chrono_literals;
std::this_thread::sleep_for(500ms);
}
}
ok = (i == dtmf.GetSize() - 1 ? true : false);