Re: [ns] need help on understanding Scheduler::instance().clock()

2012-08-08 Thread Ajenkya
Hello Can you Please help me with knowing some of functions to be edited while making a new protocol , I am working on ns2 but it really confuses me like how to add a timer , scheduler , agent . I don't understand where to add . I try but i get some errors while compiling . If you can Please h

Re: [ns] need help on understanding Scheduler::instance().clock()

2012-08-05 Thread Saravanan Kandasamy
Dear Hongsheng Lu, Scheduler::instance().clock() has 9 decimal point accuracy, most of the time it will be different. Even you are calling it in the same file and in the same function, you might end up completely different timings. You can either use a debugger or simply printf statements to und

Re: [ns] need help on understanding Scheduler::instance().clock()

2012-08-04 Thread Ali Rostami
*It* will return a unique value, because you are calling the same object from two places, no matter from where. On Sat, Aug 4, 2012 at 6:15 AM, Hongsheng Lu wrote: > > Hi there, > > I am a newer to NS2. Could anyone tells me > how Scheduler::instance().clock() works? In particular, > when Sched

[ns] need help on understanding Scheduler::instance().clock()

2012-08-03 Thread Hongsheng Lu
Hi there, I am a newer to NS2. Could anyone tells me how Scheduler::instance().clock() works? In particular, when Scheduler::instance().clock() are called at two different places in the program (might be in different methods or classes), how can I tell whether they return the same or different ti