Merge pull request from paulkaplan/emit-start-event

Emit a RUNTIME_STARTED event to track if the vm has been started
This commit is contained in:
Paul Kaplan 2018-11-27 16:38:27 -05:00 committed by GitHub
commit ffb02c607d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 2 deletions
src/engine

View file

@ -605,6 +605,14 @@ class Runtime extends EventEmitter {
return 'BLOCKSINFO_UPDATE';
}
/**
* Event name when the runtime tick loop has been started.
* @const {string}
*/
static get RUNTIME_STARTED () {
return 'RUNTIME_STARTED';
}
/**
* How rapidly we try to step threads by default, in ms.
*/
@ -2172,6 +2180,7 @@ class Runtime extends EventEmitter {
this._steppingInterval = setInterval(() => {
this._step();
}, interval);
this.emit(Runtime.RUNTIME_STARTED);
}
/**