Skip to content

Commit dd48d4d

Browse files
committed
docs: update to new timer api
1 parent 852f502 commit dd48d4d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DOCUMENTATION.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ There're a handful of other utility functions in QNS. For example, timers.
9090
const myRootEntity = patch.getEntity('facf1234567890AB');
9191
// Add a timer triggering 1s after receiving In and then triggering DoSomething on myRootEntity
9292
// Note: you'll still need to manually trigger the In pin of myTimer
93-
const myTimer = myRootEntity.addTimer(1000, { DoSomething: myRootEntity });
93+
const myTimer = myRootEntity.addTimer({
94+
time: { seconds: 1 },
95+
outputs: { DoSomething: myRootEntity }
96+
});
9497
```
9598

9699
### Custom Patches

0 commit comments

Comments
 (0)