#uselib "kernel32" #func QueryPFreq "QueryPerformanceFrequency" var #func QueryPCount "QueryPerformanceCounter" var dim lgint,4 #define _start QueryPFreq nFreq : QueryPCount nBefore #define _goal QueryPCount lgint(2) : dwTime=strf("%%.3fmSec",1000.*(lgint(2)-nBefore)/nFreq) screen 0,500,500 randomize a = rnd(8) a = a + 3 time = a * 1000 goto *start *start font "MS Pゴシック", 80, 1 pos 230,210 mes "+" await time goto *measure *measure _start font "MS Pゴシック", 80, 1 pos 210,210 color 255,0,0 mes "■" repeat stick res if res&32 { cls _goal goto *result break } await 1 loop *result font "MS Pゴシック", 20 pos 170,210 mes "反応時間:" + dwTime stop