やっぱりマクロ命令は遅いのかな。
#uselib "kernel32.dll" #func global QueryPerformanceCounter "QueryPerformanceCounter" sptr #func global QueryPerformanceFrequency "QueryPerformanceFrequency" sptr #module #deffunc starttimer dim freq dim before QueryPerformanceFrequency varptr(freq) QueryPerformanceCounter varptr(before) return #deffunc stoptimer dim after dim timetaken QueryPerformanceCounter varptr(after) timetaken = double(after - before) * 1000 / double(freq) return timetaken #global cls 4 font "Consolas", 16 color 255, 255, 255 wait 200 repeat mes "--------------" buffer 1 wait 100 starttimer repeat 10000 //処理1 for i, 0, 10, 1 next // loop stoptimer gsel 0 mes "proc1: " + refdval + "ms" buffer 1 wait 100 starttimer repeat 10000 //処理2 repeat 10 loop // loop stoptimer gsel 0 mes "proc2: " + refdval + "ms" wait 500 loop