mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Finalized the SCHEDULER and SCHEDULERDISPATCHER
- Done, time to remerge the work.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
--- Simple repeat scheduling of a function.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log.
|
||||
-- After 10 seconds, TestScheduler will stop the scheduler.
|
||||
-- After 20 seconds, TestScheduler will restart the scheduler.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 14 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( timer.getTime() .. " - Hello World Repeat")
|
||||
end, {}, 1, 1
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Stop()
|
||||
end, {}, 10
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Start()
|
||||
end, {}, 20
|
||||
)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user