Last active
November 19, 2016 09:42
-
-
Save deathponta/1f1f8bfa7b3b9942c5240cdae06cfb69 to your computer and use it in GitHub Desktop.
【MaxScript】処理時間を計測する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- スクリプトリスナーをすっきりさせるためのコマンドです。無くてもいいです。 | |
Clearlistener() | |
sTime = timeStamp() -- 開始時間保存 | |
------------------------------ | |
-- 処理内容をここに記述 | |
for i=1 to i=10000 do( | |
print i | |
) | |
------------------------------ | |
eTime = timeStamp() -- 終了時間保存 | |
res = eTime - sTime -- 単純に引き算 | |
-- 結果はミリセカンド(1000分の1秒)なので1000で割ってあげれば秒数になる | |
print "実行時間 : " + ((res/1000) as String) + "[秒] / " + (res as String) + "[ms]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment