document Time class
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 06 Sep 2006 14:18:37 +0200
changeset 68 0762b5f21416
parent 67 038bd4e756b9
child 69 a56eda76b6fa
document Time class
src/simulator/time.h
--- a/src/simulator/time.h	Wed Sep 06 14:08:19 2006 +0200
+++ b/src/simulator/time.h	Wed Sep 06 14:18:37 2006 +0200
@@ -25,26 +25,81 @@
 
 namespace ns3 {
 
+/**
+ * \brief simulation time
+ *
+ * This class is used by the user to specify when a scheduled event
+ * is expected to expire (see ns3::Simulator::schedule).
+ */
 class Time {
 public:
     Time (Time const &o);
     Time &operator = (Time const &o);
+	/**
+	 * \returns the time stored in this
+	 *          instance as seconds.
+	 */
     double s (void) const;
+	/**
+	 * \returns the time stored in this
+	 *          instance as microseconds.
+	 */
     uint64_t us (void) const;
+	/**
+	 * \returns the time stored in this
+	 *          instance as nanoseconds.
+	 */
     uint64_t ns (void) const;
+	/**
+	 * \returns true if this instance represents
+	 *          the "destroy" time.
+	 */
     bool isDestroy (void) const;
+	/**
+	 * \param s absolute time in seconds
+	 * \returns a constructed Time object
+	 */
     static Time absS (double s);
+	/**
+	 * \param us absolute time in microseconds
+	 * \returns a constructed Time object
+	 */
     static Time absUs (uint64_t us);
+	/**
+	 * \param ns absolute time in nanoseconds
+	 * \returns a constructed Time object
+	 */
     static Time absNs (uint64_t ns);
+	/**
+	 * \param s relative time in seconds
+	 * \returns a constructed Time object
+	 */
     static Time relS (double s);
+	/**
+	 * \param us relative time in microseconds
+	 * \returns a constructed Time object
+	 */
     static Time relUs (uint64_t us);
+	/**
+	 * \param ns relative time in nanoseconds
+	 * \returns a constructed Time object
+	 */
     static Time relNs (uint64_t ns);
+	/**
+	 * \returns a constructed Time object which represents
+	 *          the current simulation time
+	 */
     static Time now (void);
+	/**
+	 * \returns a constructed Time object which represents
+	 *          the current "destroy" simulation time, that
+	 *          is, the time when Simulator::destroy is
+	 *          invoked by the user.
+	 */
     static Time destroy (void);
-protected:
+private:
     Time (uint64_t ns);
     Time ();
-private:
     uint64_t m_ns;
     bool m_isDestroy;
 };