Skip to content

Commit dfc5535

Browse files
authored
Simplify time helper functions documentation
Updated the documentation to simplify the list of time helper functions and adjusted the example usage.
1 parent 322bb82 commit dfc5535

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/features/timers.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,13 @@ This ensures an event log is created, preventing replay-related inconsistencies
4545

4646
You can also use the following helper functions to create timers for specific units of time:
4747

48-
- `seconds($seconds)`
49-
- `minutes($minutes)`
50-
- `hours($hours)`
51-
- `days($days)`
52-
- `weeks($weeks)`
53-
- `months($months)`
54-
- `years($years)`
48+
**seconds, minutes, hours, days, weeks, months, years**
49+
50+
Each function returns a timer promise based on the unit:
5551

5652
```php
57-
use function Workflow\minutes;
53+
use function Workflow\{days, hours};
5854

59-
yield minutes(5);
55+
yield days(3);
56+
yield hours(2);
6057
```

0 commit comments

Comments
 (0)