大家好,
我不是 100% 确定,但我想我已经看到了一个存储运行时间的函数。我需要一个函数来捕获从单击运行那一刻到分析完成的测试时间。我正在使用 JSL。谢谢
我认为大多数人都使用 Today() 函数来实现此目的。例如,
Names Default To Here( 1 );
starttime = Today();
pl = {};
For( i = 1, i <= 10000000, i++,
Insert Into( pl, i )
);
endtime = Today();
Print( "Execution took " || Char( endtime - starttime ) || " seconds." );我喜欢使用 HP Time(),它的工作方式与 Today() 类似,但它以微秒为单位。
Names Default To Here( 1 );
starttime = HP Time();
pl = {};
For( i = 1, i <= 10000000, i++,
Insert Into( pl, i )
);
endtime = HP Time();
Print( "Execution took " || Char( endtime - starttime ) || " microseconds." );还有一个名为 Tick Seconds() 的函数可以使用
Names Default To Here( 1 );
t1 = Tick Seconds();
Open( "$SAMPLE_DATA/Big Class.jmp" );
t2 = Tick Seconds();
Round( t2 - t1, 3 );