509dd68cd405d403e3e540782128776884e799de
[platform/framework/web/crosswalk-tizen.git] /
1 var slice = require('../array/slice');
2
3     /**
4      * Delays the call of a function within a given context.
5      */
6     function timeout(fn, millis, context){
7
8         var args = slice(arguments, 3);
9
10         return setTimeout(function() {
11             fn.apply(context, args);
12         }, millis);
13     }
14
15     module.exports = timeout;
16
17