$Date: 2005/10/24 04:01:08 $
$Revision: 1.9 $
-- Create a EM_TIME
-- (From EM_DELAYED_PROCEDURES)
-- Milliseconds since EiffelMedia library initialization. wraps after ~49 days.
-- Returns reference to the singleton
-- (From EM_TIME_SINGLETON)
-- Triggers an_action every interval milliseconds
-- The INTEGER value passed to an_action is interval
-- The result of an_action may be result <= 0 : to never call an_action again
-- result = interval: to keep the same trigger interval
-- result > 0 : to set a new interval
-- hint 1: an_action should always be executed faster than interval
-- hint 2: an_action runs in a separate thread, so be careful!
-- Add a_procedure which will be called in TIME_OFFSET miliseconds from "now" in the same thread!
-- Use the feature "process" to call all procedures whose time is up.
-- You could use EM_TIME_SINGLETON for global timing: The EM_EVENT_LOOP will call "process" each loop once.
-- You can also use the EM_EVENT_LOOP to have a per scene executeion.
-- (From EM_DELAYED_PROCEDURES)
-- Waits at least milliseconds milliseconds
-- executes all stored procedures whose time is up...
-- Make sure you don't add procedures which use a lot of computation time. Only small, short
-- procedures are appropriate. Otherwise use add_timed_callback which runs functions in a different thread
-- to avoid a laggy reaction to other events.
-- (From EM_DELAYED_PROCEDURES)
-- Clean up the environment
-- clear the whole "delayed procedure call" list (procedures added with add_procedure, executed with execute)
-- (From EM_DELAYED_PROCEDURES)
-- Set are_timed_procedures_paused to a_value
-- Use this to pause the procedure callbacks. This is really usefull if you want to pause a game!
-- However, this will not pause functions added with add_timed_callback.
-- (From EM_DELAYED_PROCEDURES)
-- Are timed prcedures paused?
-- (From EM_DELAYED_PROCEDURES)
The EM_TIME class provide some features related to time
measurment. You can inherit from EM_TIME_SINGLETON if you need
any of those features.
EM_TIME allso holds a list of FUNCTION[ANY,TUPLE[INTEGER],INTEGER]
those functions are called repeadly after some defined interval time.
All this functions are executed in the same thread. This thread is an
other than the thread where the main program is running. You can use
EM_MUTEX to synchronize.