Add Node::GetLocalTime() placeholder, alias to Simulator::Now()

This commit is contained in:
Matthieu Coudron
2015-09-22 23:52:56 +02:00
parent 88f7a8df92
commit 8171d94e7c
2 changed files with 18 additions and 0 deletions

View File

@@ -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
{

View File

@@ -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.