Skip to content

Commit fa7cf54

Browse files
authored
Update timers.md
1 parent 4b1fbf6 commit fa7cf54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/features/timers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ class MyWorkflow extends Workflow
2929

3030
You may also specify the time to wait as a string e.g. '5 seconds' or '30 minutes'.
3131

32-
**Important:** When using timers, you should not use the `Carbon::now()` method to get the current time. Instead, you should use the `WorkflowStub::now()` method, which will return the current time as seen by the workflow system. This is important because the actual time may not match the time as seen by your application.
32+
**Important:** When using timers, you should not use the `Carbon::now()` method to get the current time. Instead, you should use the `WorkflowStub::now()` method, which will return the current time as seen by the workflow system. This is important because the actual time may not match the time as seen by your application. When comparing timestamps in workflows (e.g., timing how long an operation takes), always use `WorkflowStub::sideEffect(fn () => WorkflowStub::now())` instead of directly calling `WorkflowStub::now()`. This ensures the timestamp remains consistent across workflow replay.

0 commit comments

Comments
 (0)