Functions of ballerina.lang.system package
function currentTimeMillis() (int )
Gets the current system time in milliseconds
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
int | int: System time in milliseconds |
function epochTime() (int )
Gets the current system time in epoch format
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
int | int: System time in epoch time |
function getDateFormat(string format) (string )
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
format | string |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string |
function getEnv(string key) (string )
Gets the value of the specified environment variable.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
key | string | The environment variable |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string): The value of the specified environment variable |
function nanoTime() (int )
Gets the current system time in nanoseconds
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
int | int: System time in nanoseconds |
function print(any a)
Prints a 'any' value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
a | any | any value to be printed |
function println(any a)
Prints an any value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
a | any | any value to be printed |
function sleep(int t)
Halt the current thread for the specified time period
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
t | int | int: Sleep time in milliseconds |