mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-27 15:37:28 +00:00
b81b483f0b
So, when the Scheduler that is passed to the AddScheduler is nillified, the internal arrays that keep the Scheduler reference are also nillified. And it does what i need for further utilization in MOOSE classes. When the Scheduler is nillified, but, a schedule was planned for that Scheduler, once the scheduler fires off, it will ignore that call... cool. Sven
24 lines
545 B
Lua
24 lines
545 B
Lua
--- Simple function scheduling
|
|
--
|
|
-- ===
|
|
--
|
|
-- Author: FlightControl
|
|
-- Date Created: 12 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.
|
|
--
|
|
-- # Test cases:
|
|
--
|
|
-- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start.
|
|
--
|
|
--
|
|
-- # Status: TESTED - 12 Dec 2016
|
|
|
|
local TestScheduler = SCHEDULER:New( nil,
|
|
function()
|
|
BASE:E( "Hello World")
|
|
end, {}, 1
|
|
) |