Skip to content

Commit ae0c7d0

Browse files
docs: generate docs (#6)
Co-authored-by: haithium <128622475+haithium@users.noreply.github.com>
1 parent 59d7525 commit ae0c7d0

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

‎docs/api/timeutil.md‎

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ timeutil.sleep(0.1)
1212
print(timeutil.now() - start)
1313
```
1414

15-
## Functions
15+
## Fields
1616

17-
<a id="fn-mono"></a>
17+
### `_VERSION` (`string`) {#version}
1818

19-
### `mono()`
19+
Value: `"version"`
20+
21+
## Functions
22+
23+
### `mono()` {#mono}
2024

2125
Returns monotonic elapsed time in seconds.
2226

23-
**Return**:
27+
**Returns**:
2428

2529
- `seconds` (`number`)
2630

@@ -38,13 +42,13 @@ local elapsed_ms = math.floor((stop - start) * 1000)
3842
print(elapsed_ms.."ms") --> 500ms
3943
```
4044

41-
<a id="fn-now"></a>
45+
---
4246

43-
### `now()`
47+
### `now()` {#now}
4448

4549
Returns wall-clock Unix time in seconds.
4650

47-
**Return**:
51+
**Returns**:
4852

4953
- `seconds` (`number`)
5054

@@ -59,9 +63,9 @@ local dt = string.format("%s.%03d", os.date("%Y-%m-%d %H:%M:%S", seconds), ms)
5963
print(dt) --> YYYY-MM-DD HH:mm:ss.SSS
6064
```
6165

62-
<a id="fn-sleep"></a>
66+
---
6367

64-
### `sleep(seconds)`
68+
### `sleep(seconds)` {#sleep}
6569

6670
Blocks the current thread for the requested non-negative duration.
6771

@@ -75,11 +79,3 @@ Blocks the current thread for the requested non-negative duration.
7579
local time = require("timeutil")
7680
time.sleep(1.5) -- sleep for 1.5 seconds
7781
```
78-
79-
## Fields
80-
81-
<a id="version"></a>
82-
83-
### `_VERSION` (`string`)
84-
85-
Value: `"version"`

0 commit comments

Comments
 (0)