mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-01 10:07:56 +00:00
Switch to GitHub-style admonitions/alerts
As these are just a custom syntax on top of blockquotes, these work much better with text editors.
This commit is contained in:
@@ -16,19 +16,17 @@ rounded up to the nearest multiple of 0.05 seconds. If you are using coroutines
|
||||
or the @{parallel|parallel API}, it will only pause execution of the current
|
||||
thread, not the whole program.
|
||||
|
||||
:::tip
|
||||
Because sleep internally uses timers, it is a function that yields. This means
|
||||
that you can use it to prevent "Too long without yielding" errors. However, as
|
||||
the minimum sleep time is 0.05 seconds, it will slow your program down.
|
||||
:::
|
||||
> [!TIP]
|
||||
> Because sleep internally uses timers, it is a function that yields. This means
|
||||
> that you can use it to prevent "Too long without yielding" errors. However, as
|
||||
> the minimum sleep time is 0.05 seconds, it will slow your program down.
|
||||
|
||||
:::caution
|
||||
Internally, this function queues and waits for a timer event (using
|
||||
@{os.startTimer}), however it does not listen for any other events. This means
|
||||
that any event that occurs while sleeping will be entirely discarded. If you
|
||||
need to receive events while sleeping, consider using @{os.startTimer|timers},
|
||||
or the @{parallel|parallel API}.
|
||||
:::
|
||||
> [!WARNING]
|
||||
> Internally, this function queues and waits for a timer event (using
|
||||
> @{os.startTimer}), however it does not listen for any other events. This means
|
||||
> that any event that occurs while sleeping will be entirely discarded. If you
|
||||
> need to receive events while sleeping, consider using @{os.startTimer|timers},
|
||||
> or the @{parallel|parallel API}.
|
||||
|
||||
@tparam number time The number of seconds to sleep for, rounded up to the
|
||||
nearest multiple of 0.05.
|
||||
|
Reference in New Issue
Block a user