Question: Time take to execute code

Hello guys, I want maple to show me the time taken to execute the entire 500 loops shown in the code below. I read maple help and was able to come up with the code  (just part of the whole code).

st := time[real]():

for k from 1 to 500 do

  sol := LinearSolve(A, eval(b, [y[0]=y_init,z[0]=z_init])):
end do:

time[real]() - st;

my problem is that the time that shows varies/differs if i run it several times. I was expecting the same time interval of calculation. Am I doing something wrong?

Please Wait...