Alarm Class

Defines an object that triggers an event when a specified time is reached.  In addition, an optional snooze mode can be turned on when the alarm triggers that will repeat the alarm a specified number of minutes later (10 minutes by default).

Example:

The following example prints a message when the specified time has been reached.  The example assumes that you have subscribed to the Initialized event for the analysis technique.

using elsystem;

var: Alarm MyAlarm(Null); 
Method  void AnalysisTechnique_Initialized( elsystem.Object sender, elsystem.InitializedEventArgs args ) 
begin
MyAlarm = Alarm.Create(DateTime.Create(0,0,0,15,55,0));
MyAlarm.AlarmEvent += OnAlarm;
MyAlarm.Set();
end;
Method  void OnAlarm(Object sender, AlarmEventArgs  args)
begin
Print("5 minutes before market close");
end;

Namespace: elsystem

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property UseDate bool True to have the alarm respect the date as part of the target time. Otherwise, when False, the alarm is based only on the time of day.
Public property Time datetime Gets or sets the target date and time for the alarm.
Methods
  Name Description
Public property Create Creates an instance of the class.
Public property Create(time) Creates an instance of the class and sets a target time.
Public property Create(time,interval) Creates an instance of the class and sets a target time with a snooze interval (in minutes).
Public property Set Activates the alarm so that it will trigger the AlarmEvent at the designated time.
Events
  Name Description
 Public event AlarmEvent Occurs whenever the target time (or snooze time) is reached.  See AlarmEventArgs for the properties returned by the handler's args parameter.