Functions - runtime

externGetProperty
getCallStack

Retrieves the array of runtime:CallStackElement instances.

getInvocationContext

Returns the runtime:InvocationContext instance.

getProperty

Returns the system property value associated with the specified property name.

sleep

Halts the current worker for a predefined amount of time.

timeout

Gives a timeout to the current worker for a predefined amount of time.

externGetProperty

(handle name)

returns handle

Parameters

  • name handle
  • Return Type

    (handle)

getCallStack

()

returns CallStackElement[]

Retrieves the array of runtime:CallStackElement instances.

 runtime:CallStackElement[] callStackElements = runtime:getCallStack();

getInvocationContext

()

returns InvocationContext

Returns the runtime:InvocationContext instance.

 runtime:InvocationContext invocationContext = runtime:getInvocationContext();

getProperty

(string name)

returns string

Returns the system property value associated with the specified property name.

 string userHome = runtime:getProperty("user.home");

Parameters

  • name string
  • Name of the property

  • Return Type

    (string)
  • Value of the property if the property exists or else an empty string otherwise

sleep

(int millis)

Halts the current worker for a predefined amount of time.

 runtime:sleep(1000);

Parameters

  • millis int
  • Amount of time to sleep in milliseconds

timeout

(int millis)

returns future

Gives a timeout to the current worker for a predefined amount of time.

 future<()> f1 = runtime:timeout(2000);

Parameters

  • millis int
  • Amount of time needed for the timeout in milliseconds

  • Return Type

    (future)
  • Future to be invoked after the timeout