From 9318a7dc9f7def35a2e9d85ccffe63c06950be09 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 2 Mar 2025 19:45:04 +0100 Subject: Release v0.5.0 --- docs/modules/system.html | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'docs/modules') diff --git a/docs/modules/system.html b/docs/modules/system.html index ec077d8..093fd8b 100644 --- a/docs/modules/system.html +++ b/docs/modules/system.html @@ -152,12 +152,12 @@ Debug function for terminal flags (Posix). - readansi (timeout) + readansi (timeout[, fsleep=system.sleep]) Reads a single key, if it is the start of ansi escape sequence then it reads the full sequence. - readkey (timeout) + readkey (timeout[, fsleep=system.sleep]) Reads a single byte from the console, with a timeout. @@ -353,7 +353,8 @@ Windows, setting an empty string, will also delete the variable)
Generate random bytes. -This uses CryptGenRandom() on Windows, and /dev/urandom on other platforms. It will return the +This uses BCryptGenRandom() on Windows, getrandom() on Linux, arc4random_buf on BSD, +and /dev/urandom on other platforms. It will return the requested number of bytes, or an error, never a partial result. @@ -728,12 +729,12 @@ system.listconsoleflags(
- readansi (timeout) + readansi (timeout[, fsleep=system.sleep])
Reads a single key, if it is the start of ansi escape sequence then it reads the full sequence. The key can be a multi-byte string in case of multibyte UTF-8 character. - This function uses system.readkey, and hence system.sleep to wait until either a key is + This function uses system.readkey, and hence fsleep to wait until either a key is available or the timeout is reached. It returns immediately if a key is available or if timeout is less than or equal to 0. In case of an ANSI sequence, it will return the full sequence as a string. @@ -745,6 +746,11 @@ system.listconsoleflags( number the timeout in seconds. +
  • fsleep + function + the function to call for sleeping. + (default system.sleep) +
  • Returns:

    @@ -775,11 +781,11 @@ system.listconsoleflags(
    - readkey (timeout) + readkey (timeout[, fsleep=system.sleep])
    Reads a single byte from the console, with a timeout. - This function uses system.sleep to wait until either a byte is available or the timeout is reached. + This function uses fsleep to wait until either a byte is available or the timeout is reached. The sleep period is exponentially backing off, starting at 0.0125 seconds, with a maximum of 0.2 seconds. It returns immediately if a byte is available or if timeout is less than or equal to 0.

    @@ -793,6 +799,11 @@ system.listconsoleflags( number the timeout in seconds. +
  • fsleep + function + the function to call for sleeping. + (default system.sleep) +
  • Returns:

    @@ -1261,8 +1272,8 @@ flags for the iflags, oflags, and lflags

    Parameters:

    • utf8_char - string - the utf8 character to check, only the width of the first character will be returned + string or int + the utf8 character, or unicode codepoint, to check, only the width of the first character will be returned
    @@ -1411,7 +1422,7 @@ This function will sleep, without doing a busy-loop and wasting CPU cycles.
    generated by LDoc 1.5.0 -Last updated 2024-12-18 02:50:03 +Last updated 2025-03-02 19:43:40
    -- cgit v1.2.3-55-g6feb