以下の内容はhttps://culage.hatenablog.com/entry/20120420/p1より取得しました。


javascriptでStopWatchクラス

.netにある、処理時間を測定するためのStopWatchクラス。

StopWatch = function () { this.nTime = 0; };
StopWatch.prototype = {
	start  : function(){ this.startTime = new Date(); },
	stop   : function(){ this.nTime += (new Date()) - this.startTime; },
	clear  : function(){ this.nTime = 0; },
	getTime: function(){ return this.nTime; }
};

// Test
var sw = new StopWatch();
sw.start(); WScript.sleep(1000); sw.stop();
WScript.echo( sw.getTime() );



以上の内容はhttps://culage.hatenablog.com/entry/20120420/p1より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14