Files
Rennbahn/ampel.cpp
2017-12-25 08:12:10 +01:00

24 lines
372 B
C++

#include "ampel.h"
#include <unistd.h>
Ampel::Ampel() {
this->running = 1;
}
void Ampel::setStop() {
this->running = 0;
}
void Ampel::run() {
int anzahl = 0;
while (this->running) {
anzahl++;
if (anzahl < 6) {
usleep(800000);
}
else {
usleep(1400000);
}
emit ampelUpdate();
}
}