Add Node::GetLocalTime() placeholder, alias to Simulator::Now()
This commit is contained in:
@@ -110,6 +110,13 @@ Node::GetId (void) const
|
||||
return m_id;
|
||||
}
|
||||
|
||||
Time
|
||||
Node::GetLocalTime (void) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return Simulator::Now ();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
Node::GetSystemId (void) const
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace ns3 {
|
||||
class Application;
|
||||
class Packet;
|
||||
class Address;
|
||||
class Time;
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,6 +78,16 @@ public:
|
||||
*/
|
||||
uint32_t GetId (void) const;
|
||||
|
||||
/**
|
||||
* In the future, ns3 nodes may have clock that returned a local time
|
||||
* different from the virtual time Simulator::Now().
|
||||
* This function is currently a placeholder to ease the development of this feature.
|
||||
* For now, it is only an alias to Simulator::Now()
|
||||
*
|
||||
* \return The time as seen by this node
|
||||
*/
|
||||
Time GetLocalTime (void) const;
|
||||
|
||||
/**
|
||||
* \returns the system id for parallel simulations associated
|
||||
* to this node.
|
||||
|
||||
Reference in New Issue
Block a user