diff options
Diffstat (limited to 'lib/utils.js')
-rw-r--r-- | lib/utils.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/utils.js b/lib/utils.js index 12194293..dbd0079f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -46,12 +46,11 @@ function curry(f) { return function() { return f.apply(this, args.concat(slice(arguments))); }; }; -function prog1(ret, f1, f2, f3) { +function prog1(ret) { if (ret instanceof Function) ret = ret(); - if (f1) f1(); - if (f2) f2(); - if (f3) f3(); + for (var i = 1, n = arguments.length; --n > 0; ++i) + arguments[i](); return ret; }; @@ -170,9 +169,3 @@ function string_template(text, props) { return props[p]; }); }; - -function time_it(name, cont) { - var t1 = new Date().getTime(); - try { return cont(); } - finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); } -}; |