Refactor suite timing out of Env and into each Reporter

[finishes #45659879]
This commit is contained in:
Davis W. Frank and Sheel Choksi
2013-07-03 09:29:52 -07:00
parent 09fe7b0540
commit 179e54b9fb
16 changed files with 213 additions and 52 deletions

18
src/core/Timer.js Normal file
View File

@@ -0,0 +1,18 @@
getJasmineRequireObj().Timer = function() {
function Timer(options) {
options = options || {};
var now = options.now || function() { return new Date().getTime(); },
startTime;
this.start = function() {
startTime = now();
};
this.elapsed = function() {
return now() - startTime;
};
}
return Timer;
};