| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5886e20 commit 83b8474
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,21 +2,23 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const common = require('../common'); | |
| 4 | 4 | const fs = require('fs'); | |
| 5 | + const platformTimeout = common.platformTimeout; | ||
| 5 | 6 | ||
| 6 | 7 | const t1 = setInterval(() => { | |
| 7 | - common.busyLoop(12); | ||
| 8 | - }, 10); | ||
| 8 | + common.busyLoop(platformTimeout(12)); | ||
| 9 | + }, platformTimeout(10)); | ||
| 9 | 10 | ||
| 10 | 11 | const t2 = setInterval(() => { | |
| 11 | - common.busyLoop(15); | ||
| 12 | - }, 10); | ||
| 12 | + common.busyLoop(platformTimeout(15)); | ||
| 13 | + }, platformTimeout(10)); | ||
| 13 | 14 | ||
| 14 | - const t3 = setTimeout(common.mustNotCall('eventloop blocked!'), 100); | ||
| 15 | + const t3 = | ||
| 16 | + setTimeout(common.mustNotCall('eventloop blocked!'), platformTimeout(200)); | ||
| 15 | 17 | ||
| 16 | 18 | setTimeout(function() { | |
| 17 | - fs.stat('./nonexistent.txt', (err, stats) => { | ||
| 19 | + fs.stat('/dev/nonexistent', (err, stats) => { | ||
| 18 | 20 | clearInterval(t1); | |
| 19 | 21 | clearInterval(t2); | |
| 20 | 22 | clearTimeout(t3); | |
| 21 | 23 | }); | |
| 22 | - }, 50); | ||
| 24 | + }, platformTimeout(50)); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments