diff --git a/src/Services/TimeBasedSchedulingService.cpp b/src/Services/TimeBasedSchedulingService.cpp index 3db87787e58b482889ca73677e1d75c1b46bb37e..0d2f86b277e8cb769ec3c93de9bd693701f8ba17 100644 --- a/src/Services/TimeBasedSchedulingService.cpp +++ b/src/Services/TimeBasedSchedulingService.cpp @@ -44,7 +44,7 @@ void TimeBasedSchedulingService::insertActivities(Message &request) { uint16_t iterationCount = request.readUint16(); // Get the iteration count, (N) for (std::size_t i = 0; i < iterationCount; i++) { // todo: Get the group ID first, if groups are used - uint32_t currentTime = TimeGetter::getUnixSeconds(); // Get the current system time + uint32_t currentTime = TimeGetter::getSeconds(); // Get the current system time uint32_t releaseTime = request.readUint32(); // Get the specified release time if ((scheduledActivities.size() >= ECSS_MAX_NUMBER_OF_TIME_SCHED_ACTIVITIES) || @@ -78,7 +78,7 @@ void TimeBasedSchedulingService::timeShiftAllActivities(Message &request) { assert(request.serviceType == 11); assert(request.messageType == 15); - uint32_t current_time = TimeGetter::getUnixSeconds(); // Get the current system time + uint32_t current_time = TimeGetter::getSeconds(); // Get the current system time // Find the earliest release time. It will be the first element of the iterator pair const auto releaseTimes = etl::minmax_element(scheduledActivities.begin(), @@ -108,7 +108,7 @@ void TimeBasedSchedulingService::timeShiftActivitiesByID(Message &request) { assert(request.serviceType == 11); assert(request.messageType == 7); - uint32_t current_time = TimeGetter::getUnixSeconds(); // Get the current system time + uint32_t current_time = TimeGetter::getSeconds(); // Get the current system time int32_t relativeOffset = request.readSint32(); // Get the offset first diff --git a/test/Services/TimeBasedSchedulingService.cpp b/test/Services/TimeBasedSchedulingService.cpp index 5f8a2eda2d9e8b6e4326726c406694742db2b6b5..eeaca6ebf07121c179a758c47f4f239a9e17708e 100644 --- a/test/Services/TimeBasedSchedulingService.cpp +++ b/test/Services/TimeBasedSchedulingService.cpp @@ -5,6 +5,11 @@ #include <ctime> #include <vector> +/* + * A namespace defined explicitly for the purposes of testing. This namespace contains a + * structure, which has been declared as a friend in the TimeBasedSchedulingService class, so + * that it can access the private members required for testing validation. + */ namespace unit_test { struct Tester { static bool executionFunctionStatus(TimeBasedSchedulingService &tmService) {