Wireless
/
throughput
init
Diff: main.cpp
- Revision:
- 3:673862dea889
- Parent:
- 2:8dc7ee41e9a7
--- a/main.cpp Fri Jan 18 10:52:31 2019 +0000 +++ b/main.cpp Fri Jan 18 13:24:59 2019 +0000 @@ -12,6 +12,8 @@ int txDataCnt = 0; int rxDataCnt = 0; +bool transmitter = true; + bool ackknowledged = true; void init() { @@ -76,18 +78,27 @@ } void startTest() { + std::chrono::time_point<std::chrono::system_clock> start, end; // start timer + start = std::chrono::system_clock::now(); // loop { send getal // wacht op ack } // send FIN // wacht op FIN ACK // stop timer + end = std::chrono::system_clock::now(); + std::chrono::duration<double> duration = end - start; + std::cout << "Test duration: " << duration.count() << " seconds\n"; } int main() { - cs = 1; init(); - bootup(); + + if (transmitter) { + startTest(); + } else { + //listen ofzo + } while (true) { readButton();