hi, it's possible to to measure code execution time?
what word reserved i can to use?
time execution
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: time execution
Hello turbofib,
There is no such pre-built keyword, but you can code it, for example:
There is no such pre-built keyword, but you can code it, for example:
Code: Select all
once cleardebug;
Var: start_time(time_s);
var: end_time(time_s);
var: head(1);
var: res_time(time_s);
once start_time = computerdatetime;
var: ii(0);
var: xx(0);
for ii = 0 to 1000
begin
for xx = 0 to 10000
begin
head = close + close + ii + xx;
end;
end;
if LastBarOnChart_s then
begin
once
begin
end_time = computerdatetime;
res_time = end_time - start_time;
print(timetostring_ms(res_time));
end;
end;