# Standard system services reference

This appendix is a reference of the standard system services module.

## Standard system services module

Symbol | Description
afnix-sys | module
afnix:sys | nameset

`exit none Integer

The `exit` function terminates the executing program with the exit code specified as the argument.

` `sleep none Integer

The `sleep` function pause the specific thread for a certain time. The time argument is expressed in milliseconds. This function returns nil.

` `get-option String Character

The `get-option` function returns a formatted string equivalent to the system option as specified by the character argument.

` `get-random Integer none|Integer

The `get-random` function returns a random integer number. Without argument, the integer range is machine dependent. With one integer argument, the resulting integer number is less than the specified maximum bound.

` `get-random-real Real none

The `get-random-real` function returns a random real number between 0.0 and 1.0.

` `get-unique-id Integer none

The `get-unique-id` function returns an unique integer number. The returned number is unique across the session.

` `get-pid Integer none

The `get-pid` function returns the process identifier (pid). The returned value is a positive integer.

` `get-env String String

The `get-env` function returns the environment variable associated with the string argument. If the environment does not exist an exception is raised.

` `get-host-name String none

The `get-host-name` function returns the host name. The host name can be either a simple name or a canonical name with its domain, depending on the system configuration.

` `get-user-name String none

The `get-user-name` function returns the current user name.

`