Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,42 @@ Date.now() -= 3600000!
**Important!**<br>
Please remember to do this when the clocks change.

## Sleep

You can use `sleep()` to do stuff later.

```java
print("Hello")!
sleep(5)!
print("Hello 5 seconds later")!
```

You can also use `sleep()` to do stuff before.

```java
print("Hello 5 seconds later")!
sleep(-5)!
print("Hello")!
```

This is useful if you want to warn your past self of future mistakes.

```java
const const warned = false!
const var timeLeft = 1! // Should NEVER become zero

if (;warned) {
timeLeft -= 1!
}

if (timeLeft = 0) {
sleep(-1)!
const const warned = true!!
}
```

**Note:** Sometimes the program is really sleepy and wont wake up.

## Delete

To avoid confusion, the `delete` statement only works with primitive values like numbers, strings, and booleans.
Expand Down
1 change: 1 addition & 0 deletions docs/contributors/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ This list is only for people who have had a pull request accepted. If that's you
- Jason (GangstaWangstaPranksta 🥑)
- PopcornMan55D 🍿
- Svenlaa
- Scatt (scattagain)