Extensions.EventHandling.Sleep

From emotive
Jump to navigation Jump to search

Classification

Name Sleep
Short Description Suspends the current thread
Class Action
Extension OTX EventHandling extension
Group EventHandling related actions
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

EventHandling.Sleep(NumericTerm timeOut);

Description

The OTX Sleep activity suspends the current thread for the specifies amount of time in milliseconds. This can be useful for waiting on an external application or task. It does not cause CPU usage during the pause.

Properties

Name Data Type Class Default Cardinality Description
TimeOut Numeric Term - [1] This element specifies an Integer value that is interpreted as a time in milli-seconds to wait. Float values shall be truncated.

OTL Examples

/// Local Declarations

Integer Integer1;
EventHandling.EventSource EventSource1;

/// Flow

Integer1 = 12;
EventSource1 = EventHandling.MonitorChangeEventSource(Integer1);

parallel
{
	lane
	{
		EventHandling.WaitForEvent({EventSource1});
	}
	lane
	{
		EventHandling.Sleep(500);
		Integer1 = 13;
	}
}

See also

WaitForEvent
CloseEventSource