[ns] How to get the current simulation time in ns2? Or how to know the remaining time of a timer?
Mubashir Rehmani
mshrehmani at gmail.com
Mon Jan 5 06:55:03 PST 2009
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 <withhighprob at 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
More information about the Ns-users
mailing list