Functions of ballerina.lang.system package
function currentTimeMillis() (long )
Gets the current system time in milliseconds
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
long | System time in milliseconds |
function epochTime() (long )
Gets the current system time in epoch format
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
long | 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 log(int logLevel, boolean b)
Logs a Boolean value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
b | boolean | Boolean value to be logged |
function log(int logLevel, double d)
Logs a double value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
d | double | Double value to be logged |
function log(int logLevel, float f)
Logs a float value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
f | float | Float value to be logged |
function log(int logLevel, int i)
Logs an integer value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
i | int | Integer value to be logged |
function log(int logLevel, long l)
Logs a long value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
l | long | Long value to be logged |
function log(int logLevel, string s)
Logs a string value
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
logLevel | int | Log level: 1 - Trace, 2 - Debug, 3 - Info, 4 - Warn, 5 - Error |
s | string | String value to be logged |
function nanoTime() (long )
Gets the current system time in nanoseconds
Parameters:
Parameter Name | Data Type | Description |
---|
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
long | System time in nanoseconds |
function print(boolean b)
Prints a Boolean value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
b | boolean | Boolean value to be printed |
function print(double d)
Prints a double value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
d | double | Double value to be printed |
function print(float f)
Prints a float value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
f | float | Float value to be printed |
function print(int i)
Prints an integer value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
i | int | Integer value to be printed |
function print(json value)
Prints a JSON value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
value | json | JSON value to be printed |
function print(long l)
Prints a long value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
l | long | Long value to be printed |
function print(string s)
Prints a string value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
s | string | String value to be printed |
function print(xml value)
Prints an XML value to the STDOUT
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
value | xml | XML value to be printed |
function println(boolean b)
Prints a Boolean value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
b | boolean | Boolean value to be printed |
function println(double d)
Prints a double value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
d | double | Double value to be printed |
function println(float f)
Prints a float value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
f | float | Float value to be printed |
function println(int i)
Prints an integer value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
i | int | Integer value to be printed |
function println(json value)
Prints a JSON value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
value | json | JSON value to be printed |
function println(long l)
Prints a long value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
l | long | Long value to be printed |
function println(string s)
Prints a string value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
s | string | String value to be printed |
function println(xml value)
Prints an XML value to the STDOUT in a new line
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
value | xml | XML value to be printed |