Added timing logging to start/stop display, not just timed exposure
This commit is contained in:
parent
8d6e1a8f67
commit
58f0d17779
|
@ -60,6 +60,7 @@ void actionDisplay () {
|
||||||
displaying = true;
|
displaying = true;
|
||||||
completed = true;
|
completed = true;
|
||||||
timing = false;
|
timing = false;
|
||||||
|
startTime = steady_clock::now();
|
||||||
} else if (exposure.size() == 1) {
|
} else if (exposure.size() == 1) {
|
||||||
exposureTime = exposure[0];
|
exposureTime = exposure[0];
|
||||||
displaying = true;
|
displaying = true;
|
||||||
|
@ -72,6 +73,9 @@ void actionDisplay () {
|
||||||
void actionStop () {
|
void actionStop () {
|
||||||
displaying = false;
|
displaying = false;
|
||||||
completed = true;
|
completed = true;
|
||||||
|
auto currentTime = steady_clock::now();
|
||||||
|
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||||
|
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : null }" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void postAction () {
|
void postAction () {
|
||||||
|
@ -163,7 +167,7 @@ void display () {
|
||||||
if (displaying && timing) {
|
if (displaying && timing) {
|
||||||
auto currentTime = steady_clock::now();
|
auto currentTime = steady_clock::now();
|
||||||
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||||
if (elapsedTime > exposureTime) {
|
if (elapsedTime >= exposureTime) {
|
||||||
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : " << exposureTime << " }" << endl;
|
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : " << exposureTime << " }" << endl;
|
||||||
displaying = false;
|
displaying = false;
|
||||||
timing = false;
|
timing = false;
|
||||||
|
|
Loading…
Reference in New Issue