Sha256: 1989560653865c4a542afbeaf0cc065ebdc146e44f8172649af7f442c05bd9ca

Contents?: true

Size: 379 Bytes

Versions: 3

Compression:

Stored size: 379 Bytes

Contents

export default class Stats {
	constructor () {
		Object.defineProperties( this, {
			startTimes: { value: {} }
		});
	}

	time ( label ) {
		this.startTimes[ label ] = process.hrtime();
	}

	timeEnd ( label ) {
		const elapsed = process.hrtime( this.startTimes[ label ] );

		if ( !this[ label ] ) this[ label ] = 0;
		this[ label ] += elapsed[0] * 1e3 + elapsed[1] * 1e-6;
	}
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jass-vue-0.4.0 vendor/node_modules/magic-string/src/utils/Stats.js
jass-vue-0.3.0 vendor/node_modules/magic-string/src/utils/Stats.js
jass-vue-0.2.1 vendor/node_modules/magic-string/src/utils/Stats.js