Skip to content

Commit

Permalink
feat: backgroundTxIntervalTime
Browse files Browse the repository at this point in the history
  • Loading branch information
singyiu committed Oct 22, 2023
1 parent 2785b2f commit c186f8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/mudExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const MudExample = () => {
const defaultTestAmount = 1000;
const defaultConsumeAmount = 400;
const defaultYieldAmount = 50;
const backgroundTxIntervalTime = 20000;

const counter = useComponentValue(Counter, singletonEntity);
const gameSetting = useComponentValue(GameSetting, singletonEntity);
Expand Down Expand Up @@ -88,7 +89,7 @@ export const MudExample = () => {
if (backgroundTxEnabled) {
executeBackgroundTx();
}
}, 30000);
}, backgroundTxIntervalTime);
return () => {
clearInterval(backgroundTxIntervalId);
};
Expand Down

0 comments on commit c186f8a

Please sign in to comment.