Skip to content

Commit

Permalink
fix: example delay 10s instead of 0s
Browse files Browse the repository at this point in the history
  • Loading branch information
hugojosefson committed Jul 13, 2023
1 parent 69394b8 commit 30834da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import "https://deno.land/x/websocket_broadcastchannel/polyfill.ts";

const pid = Deno.pid;
const pidLastDigit = pid % 10;
const delay = pidLastDigit * 1000;
const delay = (pidLastDigit || 10) * 1000;

const log = (s: string, ...args: unknown[]) => {
console.log(`[broadcast.ts#${pid}] ${s}`, ...args);
Expand Down
2 changes: 1 addition & 1 deletion examples/broadcast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "../polyfill.ts";

const pid = Deno.pid;
const pidLastDigit = pid % 10;
const delay = pidLastDigit * 1000;
const delay = (pidLastDigit || 10) * 1000;

const log = (s: string, ...args: unknown[]) => {
console.log(`[broadcast.ts#${pid}] ${s}`, ...args);
Expand Down

0 comments on commit 30834da

Please sign in to comment.