42 using clock = std::chrono::steady_clock;
51 firstValueTime = clock::now();
57 return firstValueTime.time_since_epoch() != clock::duration::zero();
60 TimeVal time()
const {
return GetTimeDifference(firstValueTime); }
62 double timeInDouble()
const {
return GetTimeDifferenceInDouble(firstValueTime); }
70 clock::time_point firstValueTime{};
74 void startTimer() W_SIGNAL(startTimer);
79 context.document.view()->viewDelegate().getWidget()->setEnabled(
false);
135 auto recordListening = GetAddressesToRecordRecursive(ctx.explorer);
136 if(recordListening.empty())
140 ctx.explorer.deviceModel().listening().stop();
143 Box box = CreateBox(ctx);
145 if(!recorder.setup(box, recordListening))
147 ctx.explorer.deviceModel().listening().restore();
153 ctx.timer.setTimerType(Qt::PreciseTimer);
154 ctx.timer.setInterval(ReasonableUpdateInterval(recorder.count()));
155 QObject::connect(&ctx.timer, &QTimer::timeout,
this, [&, box]() {
157 auto& cur_date = box.interval.date();
158 box.moveCommand.update(
159 ctx.scenario, {}, box.endEvent,
160 cur_date + GetTimeDifference(ctx.firstValueTime), 0,
true);
162 box.moveCommand.redo(ctx.context);
169 [&]() { ctx.timer.stop(); });
181 ctx.explorer.deviceModel().listening().restore();
182 ctx.dispatcher.commit();
183 ctx.context.document.view()->viewDelegate().getWidget()->setEnabled(
true);
Definition RecordProviderFactory.hpp:39
Definition DocumentContext.hpp:18