(function (runInThisContext) {
 
    /* POLYFILLS */

    Number.isFinite = function (value) {
        return typeof value === 'number' && isFinite(value);
    };

    /* NATIVE MODULE */

    function NativeModule(id) {
        this.filename = id + '.js';
        this.id = id;
        this.exports = {};
        this.loaded = false;
    }

    NativeModule._source = process.binding('natives');
    NativeModule._cache = {};

    NativeModule.require = function(id) {
        if (id == 'native_module') {
            return NativeModule;
        }
        
        var cached = NativeModule.getCached(id);
        if (cached) {
            return cached.exports;
        }
        
        if (!NativeModule.exists(id)) {
            throw new Error('No such native module ' + id);
        }
        
        process.moduleLoadList.push('NativeModule ' + id);
        
        var nativeModule = new NativeModule(id);
        
        nativeModule.cache();
        nativeModule.compile();
        
        return nativeModule.exports;
    };

    NativeModule.getCached = function(id) {
        return NativeModule._cache[id];
    };

    NativeModule.exists = function(id) {
        return NativeModule._source.hasOwnProperty(id);
    };

    NativeModule.getSource = function(id) {
        return NativeModule._source[id];
    };

    NativeModule.wrap = function(script) {
        return NativeModule.wrapper[0] + script + NativeModule.wrapper[1];
    };

    NativeModule.wrapper = [
                            '(function (exports, require, module, __filename, __dirname) { ',
                            '\n});'
                            ];

    NativeModule.prototype.compile = function() {
        var source = NativeModule.getSource(this.id);
        source = NativeModule.wrap(source);
        
        var fn = runInThisContext(source, { filename: this.filename });
        fn(this.exports, NativeModule.require, this, this.filename);
        
        this.loaded = true;
    };

    NativeModule.prototype.cache = function() {
        NativeModule._cache[this.id] = this;
    };

    /* GLOBAL VARIABLES */

    this.global = this;

    Object.defineProperty(this, 'Buffer', {
        configurable: true,
        get: function () {
            return require('buffer').Buffer;
        }
    });

    this.require = NativeModule.require;

});
@@ -2347,11 +2347,911 @@
 quire;%0A%0A
+    /* TIMERS */%0A%0A    this.setTimeout = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.setTimeout.apply(this, arguments);%0A    %7D;%0A%0A    this.setInterval = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.setInterval.apply(this, arguments);%0A    %7D;%0A%0A    this.clearTimeout = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.clearTimeout.apply(this, arguments);%0A    %7D;%0A%0A    this.clearInterval = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.clearInterval.apply(this, arguments);%0A    %7D;%0A%0A    this.setImmediate = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.setImmediate.apply(this, arguments);%0A    %7D;%0A%0A    this.clearImmediate = function() %7B%0A        var t = NativeModule.require('timers');%0A        return t.clearImmediate.apply(this, arguments);%0A    %7D;%0A%0A
 %7D);

add timer functions to global