Skip to content

Commit d9d7fa1

Browse files
authored
docs: clarify getRemainingTime description (#16)
1 parent fc99aaa commit d9d7fa1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/content/docs/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ Argument is optional and defaults to the lock expiration time.
131131

132132
### `getRemainingTime`
133133

134-
Get the remaining time before the lock expires.
134+
Get the remaining time in milliseconds before the lock expires.
135135

136136
```ts
137137
const lock = verrou.createLock('key', '10s')
138138
await lock.acquire()
139139

140+
// returns remaining time for the lock in milliseconds
140141
const remainingTime = lock.getRemainingTime()
141142
```
142143

packages/verrou/src/lock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class Lock {
174174
}
175175

176176
/**
177-
* Get the remaining time before the lock expires
177+
* Get the remaining time in milliseconds before the lock expires
178178
*/
179179
getRemainingTime() {
180180
if (this.#expirationTime === null) return null

0 commit comments

Comments
 (0)