Skip to content

Instantly share code, notes, and snippets.

@deathponta
Last active November 19, 2016 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deathponta/1f1f8bfa7b3b9942c5240cdae06cfb69 to your computer and use it in GitHub Desktop.
Save deathponta/1f1f8bfa7b3b9942c5240cdae06cfb69 to your computer and use it in GitHub Desktop.
【MaxScript】処理時間を計測する
-- スクリプトリスナーをすっきりさせるためのコマンドです。無くてもいいです。
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