equal
deleted
inserted
replaced
329 * \brief create ns3::Time instances in units of seconds. |
329 * \brief create ns3::Time instances in units of seconds. |
330 * |
330 * |
331 * For example: |
331 * For example: |
332 * \code |
332 * \code |
333 * Time t = Seconds (2.0); |
333 * Time t = Seconds (2.0); |
334 * Simulator::Schedule (Now () + NanoSeconds (5.0), ...); |
334 * Simulator::Schedule (NanoSeconds (5.0), ...); |
335 * \endcode |
335 * \endcode |
336 */ |
336 */ |
337 class Seconds : public TimeUnit<1> |
337 class Seconds : public TimeUnit<1> |
338 { |
338 { |
339 public: |
339 public: |
345 * \brief create ns3::Time instances in units of milliseconds. |
345 * \brief create ns3::Time instances in units of milliseconds. |
346 * |
346 * |
347 * For example: |
347 * For example: |
348 * \code |
348 * \code |
349 * Time t = MilliSeconds (2); |
349 * Time t = MilliSeconds (2); |
350 * Simulator::Schedule (Now () + MilliSeconds (5), ...); |
350 * Simulator::Schedule (MilliSeconds (5), ...); |
351 * \endcode |
351 * \endcode |
352 */ |
352 */ |
353 class MilliSeconds : public TimeUnit<1> |
353 class MilliSeconds : public TimeUnit<1> |
354 { |
354 { |
355 public: |
355 public: |
360 * \brief create ns3::Time instances in units of microseconds. |
360 * \brief create ns3::Time instances in units of microseconds. |
361 * |
361 * |
362 * For example: |
362 * For example: |
363 * \code |
363 * \code |
364 * Time t = MicroSeconds (2); |
364 * Time t = MicroSeconds (2); |
365 * Simulator::Schedule (Now () + MicroSeconds (5), ...); |
365 * Simulator::Schedule (MicroSeconds (5), ...); |
366 * \endcode |
366 * \endcode |
367 */ |
367 */ |
368 class MicroSeconds : public TimeUnit<1> |
368 class MicroSeconds : public TimeUnit<1> |
369 { |
369 { |
370 public: |
370 public: |
375 * \brief create ns3::Time instances in units of nanoseconds. |
375 * \brief create ns3::Time instances in units of nanoseconds. |
376 * |
376 * |
377 * For example: |
377 * For example: |
378 * \code |
378 * \code |
379 * Time t = NanoSeconds (2); |
379 * Time t = NanoSeconds (2); |
380 * Simulator::Schedule (Now () + NanoSeconds (5), ...); |
380 * Simulator::Schedule (NanoSeconds (5), ...); |
381 * \endcode |
381 * \endcode |
382 */ |
382 */ |
383 class NanoSeconds : public TimeUnit<1> |
383 class NanoSeconds : public TimeUnit<1> |
384 { |
384 { |
385 public: |
385 public: |
393 * |
393 * |
394 * This is really a shortcut for the ns3::Simulator::Now method. |
394 * This is really a shortcut for the ns3::Simulator::Now method. |
395 * It is typically used as shown below to schedule an event |
395 * It is typically used as shown below to schedule an event |
396 * which expires in 2 seconds from now: |
396 * which expires in 2 seconds from now: |
397 * \code |
397 * \code |
398 * Simulator::Schedule (Now () + Seconds (2.0), &my_function); |
398 * Simulator::Schedule (Seconds (2.0), &my_function); |
399 * \endcode |
399 * \endcode |
400 */ |
400 */ |
401 class Now : public Time |
401 class Now : public Time |
402 { |
402 { |
403 public: |
403 public: |