Question: Why the time difference varies for the same calculation at different times?

There is a time difference variation between two clocks (0.124, 0.120) and between the same clocks for the same calculations at different times(0.07, 0.124 and 0.120, 68. What is the reason?

Thanks for answering.

Ramakrishnan V
 

restart; t1 := time[real]()

2344.956

(1)

t1PC := Now(ProcessClock)

_m1718422690432

(2)

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

2345.080

(3)

t2PC := Now(ProcessClock)

_m1718421822656

(4)

tdiff := t2-t1

.124

(5)

tdiffPC := t2PC-t1PC

120*Units:-Unit(ns)

(6)

I redo the same programm again to see the time of performance

t1 := time[real]()

2345.253

(7)

t1PC := Now(ProcessClock)

_m1718419758016

(8)

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

2345.323

(9)

t2PC := Now(ProcessClock)

_m1718418631616

(10)

tdiff := t2-t1

0.70e-1

(11)

tdiffPC := t2PC-t1PC

68*Units:-Unit(ns)

(12)

 

Now I again recall the stored time values. (unit: milliseconds). t1 and t2 are retained for ever until unassigned.

t1

2345.253

(13)

``

t2

2345.323

(14)

t2-t1

0.70e-1

(15)

t2PC-t1PC

68*Units:-Unit(ns)

(16)

``


 

Download timeToRunDifference.mw

Please Wait...