D24151: Summary: Connect Scheduler sleep timer to Simulation Clock scale change.
Eric Dejouhanet
noreply at phabricator.kde.org
Sun Sep 22 21:00:27 BST 2019
TallFurryMan created this revision.
TallFurryMan added reviewers: wreissenberger, mutlaqja, alexcherney.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
TallFurryMan requested review of this revision.
REVISION SUMMARY
First, this differential fixes the SimClock scale change so that the change signal is emitted before actual change, providing the new scale as argument.
This enables the slot function to properly estimate the change affecting durations.
Then, it connects the scale change to the Scheduler, so that the sleep timer is recalculated when the SimClock scale updates.
Scheduler sleep duration is then computed based on the SimClock scale, and updated whenever that scale changes.
This allows to debug situations where the Scheduler is set to sleep for a long time in the future.
Warning: pausing or manually advancing the SimClock currently does not impact the sleep timer.
In that case, Scheduler will wake up at an unexpected time.
The change does not impact any other timer than the sleep timer.
The change does not scale the estimation of job duration neither, as it would cause further observations to be scheduled incorrectly far away.
TEST PLAN
- Create a scheduled observation starting in two hours from now.
- Start the Scheduler, verify it sets to sleep for two hours.
- Change the simulation clock scale, verify a message is logged indicating the rescaled remaining time.
- Verify Scheduler wakes up a the proper simulation time.
REPOSITORY
R321 KStars
BRANCH
feature__scheduler_synced_to_simulation (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D24151
AFFECTED FILES
kstars/ekos/scheduler/scheduler.cpp
kstars/ekos/scheduler/scheduler.h
kstars/time/simclock.cpp
To: TallFurryMan, wreissenberger, mutlaqja, alexcherney
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190922/7e5a636d/attachment.html>
More information about the kde-edu
mailing list