diff --git a/content/reference.md b/content/reference.md index 4dfe34e..bdc47c9 100644 --- a/content/reference.md +++ b/content/reference.md @@ -7020,7 +7020,7 @@ Return true if the first argument appears as a substring within the second argum ### Types -#### LISPCONDITION [TYPE] +#### LISPCONDITION [TYPE] Condition for lisp error handling. Uses `cl:condition`. @@ -7038,7 +7038,7 @@ Condition for lisp error handling. Uses `cl:condition`. ### Structs -#### PROFILE :A [STRUCT] +#### PROFILE :A [STRUCT] - OUTPUT :: :A
The output of the function - RUN-TIME :: COALTON:UFIX
The run time of the run - REAL-TIME :: COALTON:UFIX
The real time of the run @@ -7059,7 +7059,7 @@ A profile of a run function. ### Values -#### (ADD-FEATURE FEAT) [FUNCTION] +#### (ADD-FEATURE FEAT) [FUNCTION] (STRINGUNIT) Adds a feature `feat` to `cl:*features*`. @@ -7068,7 +7068,7 @@ Adds a feature `feat` to `cl:*features*`. *** -#### (ARCHITECTURE _) [FUNCTION] +#### (ARCHITECTURE _) [FUNCTION] (UNITSTRING) The system's architecture (stored at compile time). @@ -7077,7 +7077,7 @@ The system's architecture (stored at compile time). *** -#### (ARGV0 _) [FUNCTION] +#### (ARGV0 _) [FUNCTION] (UNIT → (OPTIONAL STRING)) The first command line argument (stored at compile time). @@ -7086,7 +7086,7 @@ The first command line argument (stored at compile time). *** -#### (CAPTURE-PROFILE F) [FUNCTION] +#### (CAPTURE-PROFILE F) [FUNCTION] ∀ :A. ((UNIT → :A) → (PROFILE :A)) Runs a function, recording profile information and returning a Profile object. @@ -7095,7 +7095,7 @@ Runs a function, recording profile information and returning a Profile object. *** -#### (CMD-ARGS _) [FUNCTION] +#### (CMD-ARGS _) [FUNCTION] (UNIT → (LIST STRING)) The current command line arguments (stored at compile time). @@ -7104,7 +7104,7 @@ The current command line arguments (stored at compile time). *** -#### (FEATURES _) [FUNCTION] +#### (FEATURES _) [FUNCTION] (UNIT → (LIST STRING)) Returns a list of active features, from `cl:*features*`. @@ -7113,7 +7113,7 @@ Returns a list of active features, from `cl:*features*`. *** -#### (GC _) [FUNCTION] +#### (GC _) [FUNCTION] (UNITUNIT) Perform a full garbage collection. @@ -7122,7 +7122,7 @@ Perform a full garbage collection. *** -#### (GET-BYTES-CONSED _) [FUNCTION] +#### (GET-BYTES-CONSED _) [FUNCTION] (UNITUFIX) Gets the number of bytes consed (only implemented for SBCL @@ -7131,7 +7131,7 @@ Gets the number of bytes consed (only implemented for SBCL *** -#### (GET-REAL-TIME _) [FUNCTION] +#### (GET-REAL-TIME _) [FUNCTION] (UNITUFIX) Gets the real-time. @@ -7140,7 +7140,7 @@ Gets the real-time. *** -#### (GET-RUN-TIME _) [FUNCTION] +#### (GET-RUN-TIME _) [FUNCTION] (UNITUFIX) Gets the run-time. @@ -7149,7 +7149,7 @@ Gets the run-time. *** -#### (GETENV VAR) [FUNCTION] +#### (GETENV VAR) [FUNCTION] (STRING → (OPTIONAL STRING)) Gets the value of the environmental variable `var`, errors if `var` doesn't exist. @@ -7158,7 +7158,7 @@ Gets the value of the environmental variable `var`, errors if `var` doesn't exis *** -#### (HOSTNAME _) [FUNCTION] +#### (HOSTNAME _) [FUNCTION] (UNITSTRING) Returns the system's hostname. This is a function because the hostname can be redefined. @@ -7167,7 +7167,7 @@ Returns the system's hostname. This is a function because the hostname can be re *** -#### (IMPLEMENTATION _) [FUNCTION] +#### (IMPLEMENTATION _) [FUNCTION] (UNITSTRING) The lisp implementation (stored at compile time). @@ -7176,7 +7176,7 @@ The lisp implementation (stored at compile time). *** -#### (LISP-VERSION _) [FUNCTION] +#### (LISP-VERSION _) [FUNCTION] (UNITSTRING) The lisp implementation version (stored at compile time). @@ -7185,7 +7185,7 @@ The lisp implementation version (stored at compile time). *** -#### (OS _) [FUNCTION] +#### (OS _) [FUNCTION] (UNITSTRING) The system's operating system (stored at compile time). @@ -7194,7 +7194,7 @@ The system's operating system (stored at compile time). *** -#### (SETENV! VAR VAL) [FUNCTION] +#### (SETENV! VAR VAL) [FUNCTION] (STRINGSTRINGUNIT) Sets an environment variable `var` to string `val`, only if `var` already exists. @@ -7203,16 +7203,18 @@ Sets an environment variable `var` to string `val`, only if `var` already exists *** -#### (SLEEP N) [FUNCTION] -(INTEGERUNIT) +#### (SLEEP N) [FUNCTION] +∀ :A. RATIONAL :A ⇒ (:A → UNIT) -Sleep for `n` seconds. +Sleep for `n` seconds, where `n` can be of any type with an instance of `Rational`. + +Sleep uses type class `Rational`'s `best-approx` instead of `Real`'s `real-approx` because it handles the approximation without arbitrary precision. The only `Real` type excluded by this decision is `CReal`. *** -#### (TIME F) [FUNCTION] +#### (TIME F) [FUNCTION] ∀ :A. ((UNIT → :A) → (TUPLE :A INTEGER)) Run the thunk `f` and return a tuple containing its value along with the run time in microseconds.