2015-05-19 19:00:06 +08:00
|
|
|
'use strict';
|
2010-12-05 07:20:34 +08:00
|
|
|
var common = require('../common');
|
2010-12-06 06:33:52 +08:00
|
|
|
var assert = require('assert');
|
2010-01-19 02:12:04 +08:00
|
|
|
|
|
|
|
var complete = false;
|
|
|
|
var idle = new process.IdleWatcher();
|
2010-12-06 06:33:52 +08:00
|
|
|
idle.callback = function() {
|
2010-01-19 02:12:04 +08:00
|
|
|
complete = true;
|
|
|
|
idle.stop();
|
|
|
|
};
|
|
|
|
idle.setPriority(process.EVMAXPRI);
|
|
|
|
idle.start();
|
|
|
|
|
2011-10-15 07:08:36 +08:00
|
|
|
process.on('exit', function() {
|
2010-01-19 02:12:04 +08:00
|
|
|
assert.ok(complete);
|
|
|
|
});
|