--- a/src/network/model/node.cc Mon Sep 21 23:12:24 2015 +0200
+++ b/src/network/model/node.cc Tue Sep 22 23:52:56 2015 +0200
@@ -110,6 +110,13 @@
return m_id;
}
+Time
+Node::GetLocalTime (void) const
+{
+ NS_LOG_FUNCTION (this);
+ return Simulator::Now ();
+}
+
uint32_t
Node::GetSystemId (void) const
{
--- a/src/network/model/node.h Mon Sep 21 23:12:24 2015 +0200
+++ b/src/network/model/node.h Tue Sep 22 23:52:56 2015 +0200
@@ -33,6 +33,7 @@
class Application;
class Packet;
class Address;
+class Time;
/**
@@ -78,6 +79,16 @@
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.
*/