<table><tr><td style="">TallFurryMan created this revision.<br />TallFurryMan added reviewers: wreissenberger, mutlaqja, alexcherney.<br />Herald added a project: KDE Edu.<br />Herald added a subscriber: kde-edu.<br />TallFurryMan requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24151">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>First, this differential fixes the SimClock scale change so that the change signal is emitted before actual change, providing the new scale as argument.<br />
This enables the slot function to properly estimate the change affecting durations.</p>

<p>Then, it connects the scale change to the Scheduler, so that the sleep timer is recalculated when the SimClock scale updates.<br />
Scheduler sleep duration is then computed based on the SimClock scale, and updated whenever that scale changes.<br />
This allows to debug situations where the Scheduler is set to sleep for a long time in the future.</p>

<p>Warning: pausing or manually advancing the SimClock currently does not impact the sleep timer.<br />
In that case, Scheduler will wake up at an unexpected time.</p>

<p>The change does not impact any other timer than the sleep timer.<br />
The change does not scale the estimation of job duration neither, as it would cause further observations to be scheduled incorrectly far away.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Create a scheduled observation starting in two hours from now.</li>
<li class="remarkup-list-item">Start the Scheduler, verify it sets to sleep for two hours.</li>
<li class="remarkup-list-item">Change the simulation clock scale, verify a message is logged indicating the rescaled remaining time.</li>
<li class="remarkup-list-item">Verify Scheduler wakes up a the proper simulation time.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R321 KStars</div></div></div><br /><div><strong>BRANCH</strong><div><div>feature__scheduler_synced_to_simulation (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24151">https://phabricator.kde.org/D24151</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kstars/ekos/scheduler/scheduler.cpp<br />
kstars/ekos/scheduler/scheduler.h<br />
kstars/time/simclock.cpp</div></div></div><br /><div><strong>To: </strong>TallFurryMan, wreissenberger, mutlaqja, alexcherney<br /><strong>Cc: </strong>kde-edu, narvaez, apol<br /></div>