Returns a fast, monotonic tick count for timing short spans. Ticks are not seconds and the rate varies by machine, so compare readings only with each other.
start := read_cpu_counter();
stop := read_cpu_counter();
assert(stop >= start);↗#import "System";
Asks the operating system about the machine, the user and the running program.
Strings returned here live in temporary storage; copy one to keep it.
path := get_path_of_running_executable();
assert(path.count > 0);Returns a fast, monotonic tick count for timing short spans. Ticks are not seconds and the rate varies by machine, so compare readings only with each other.
start := read_cpu_counter();
stop := read_cpu_counter();
assert(stop >= start);↗Returns the name of the current user and whether the lookup worked.
name, ok := get_username();
assert(!ok || name.count > 0);↗Returns the home directory of username, or of the current user when it is empty, and whether the lookup worked.
home, ok := get_home_directory();
assert(!ok || home.count > 0);↗Returns the machine's host name, or an empty string if it cannot be read.
assert(get_machinename().count > 0);↗Returns the full path of the running program, or an empty string if it cannot be found.
assert(get_path_of_running_executable().count > 0);↗How many processors of a kind the machine has.
logical := get_number_of_processors(.ALL_LOGICAL);
assert(logical >= get_number_of_processors(.ALL_PHYSICAL) && logical > 0);↗Returns the system's message for an error code, such as "No such file or directory".
assert(get_error_string(get_error_value()).count >= 0);↗Returns the last OS error code together with its message.
code, message := get_error_value_and_string();
assert(message.count >= 0);↗Which processors get_number_of_processors counts: physical cores or logical threads, all of them or only the performance ones on hybrid chips.
Returns the last error code the operating system set: errno on Unix, GetLastError on Windows. Read it right after the call that failed.
description := get_error_string(get_error_value());
assert(description.count >= 0);↗Returns the user database entry for username, or for the current user when it is empty. Linux and Android only.