Merge pull request #1928 from kchadha/timer-perf

Improve the performance of the timer utilitiy
This commit is contained in:
Karishma Chadha authored and GitHub committed 2019-01-23 11:41:41 -05:00
commit 98b92be2d7
1 file changed
+5 -3
+5 -3
View File
@@ -21,6 +21,10 @@ class BlockUtility {
* @type {?Thread}
*/
this.thread = thread;
this._nowObj = {
now: () => this.sequencer.runtime.currentMSecs
};
}
/**
@@ -46,9 +50,7 @@ class BlockUtility {
*/
get nowObj () {
if (this.runtime) {
return {
now: () => this.runtime.currentMSecs
};
return this._nowObj;
}
return null;
}