Dear Matt Wood

To know the current time in C++ files of ns2, you can use these commands

#define CURRENT_TIME    Scheduler::instance().clock()
cout<<CURRENT_TIME<<endl;

Hope it helps
Regards

Mubashir
Lip6, UPMC, Paris, France

2009/1/5 matt Wood <withhighp...@gmail.com>

>
> Dear all,
>    I want to know the current time in C++ programs. Is there a
> function to do this? Or, How can I get the remaining time of a running
> timer? In OpNet the function simtime( ) can be used to get the current
> time. But I can't find the corresponding one in the NS2.
>
> Thank you in advance.
> Bests,
> Matthew Wood
>
>


-- 
Mubashir Husain Rehmani

Reply via email to