Thread API

thread_id()

Returns caller’s unique thread id.

fn thread_id () int

thread_sleep()

Sleeps the thread for a given time interval.

fn thread_sleep (milliseconds: int) void

Parameters

milliseconds - The duration of sleep.