[ns] How can I get comutation time at a node ?

Daehee Kim dahkim77 at gmail.com
Sun Jan 18 11:50:43 PST 2009


Hi.

I am using NS2.33 in Linux
I am trying to measure computation time in each node (for example such as
M^3 computation)

// Here, measured current time.. (Before computation)

for ... (100 loop)
   for ... (100 loop)
        for .... (100 loop)

// Here, measured current time... (After computation)

I expected the time between before computation and after computation will be
different (at least hundreds of milliseconds...)
I used "Scheduler::instance().clock()" to get the before time and after time

However, irrespective of number of loop, the times which were measured at
both case (before, after) was same.

I don't understand why two time becomes same.
I heard NS2 is discrete event mode. Is that the reason of same time ?
If so, can you explain what happened in NS2 ?
Also, are there any way to compute the difference time between two times in
NS2 ?

I would very apprecaite any help.

Danny.


-- 
DaeHee(Danny) Kim
Department of Electrical Engineering and Computer Science(EECS), Wichita
State University
email-address : dxkim3 at wichita.edu, dahkim77 at gmail.com


More information about the Ns-users mailing list