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;
|
||||
completed = true;
|
||||
timing = false;
|
||||
startTime = steady_clock::now();
|
||||
} else if (exposure.size() == 1) {
|
||||
exposureTime = exposure[0];
|
||||
displaying = true;
|
||||
|
@ -72,6 +73,9 @@ void actionDisplay () {
|
|||
void actionStop () {
|
||||
displaying = false;
|
||||
completed = true;
|
||||
auto currentTime = steady_clock::now();
|
||||
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : null }" << endl;
|
||||
}
|
||||
|
||||
void postAction () {
|
||||
|
@ -163,7 +167,7 @@ void display () {
|
|||
if (displaying && timing) {
|
||||
auto currentTime = steady_clock::now();
|
||||
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||
if (elapsedTime > exposureTime) {
|
||||
if (elapsedTime >= exposureTime) {
|
||||
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : " << exposureTime << " }" << endl;
|
||||
displaying = false;
|
||||
timing = false;
|
||||
|
|
Loading…
Reference in New Issue