Files
weipan02_server/nodejs/node_modules/long-timeout/example.js
你的名字 0483b4b364 1
2025-07-14 10:22:40 +08:00

24 lines
359 B
JavaScript
Executable File

var lt = require('./')
/*
Timeouts
*/
lt.setTimeout(function() {
console.log('in a long time')
}, Number.MAX_VALUE)
lt.setTimeout(function() {
console.log('2 seconds')
}, 2000)
/*
Intervals
*/
lt.setInterval(function() {
console.log('long interval')
}, Number.MAX_VALUE)
lt.setInterval(function() {
console.log("2 second interval")
}, 2000)