Skip to content

Commit

Permalink
Update timers.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcdaniel authored Feb 23, 2025
1 parent 86d9436 commit af2c261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/features/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You may also specify the time to wait as a string e.g. '5 seconds' or '30 minute

**Important:** When using timers, do not use `Carbon::now()` to get the current time. Instead, use `WorkflowStub::now()`, which returns the current time as seen by the workflow system. This is crucial because the actual time may not match your application's system clock.

Additionally, when measuring elapsed time in workflows (e.g., tracking how long an operation takes), always get your start time with:
Additionally, when measuring elapsed time in workflows (e.g., tracking how long an activity takes), always get your start time with:

```php
$start = yield WorkflowStub::sideEffect(fn () => WorkflowStub::now());
Expand Down

0 comments on commit af2c261

Please sign in to comment.