Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 1 | /** -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Alexander Afanasyev |
| 5 | * |
| 6 | * BSD license, See the doc/LICENSE file for more information |
| 7 | * |
| 8 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 9 | */ |
| 10 | |
| 11 | #ifndef NDN_COMMON_H |
| 12 | #define NDN_COMMON_H |
| 13 | |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 14 | #include "ns3/nstime.h" |
| 15 | #include "ns3/simulator.h" |
| 16 | |
| 17 | #define NDNSIM_MODE 1 |
| 18 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 19 | #define NDN_NAMESPACE_BEGIN namespace ns3 { namespace ndn { |
| 20 | #define NDN_NAMESPACE_END } /*ndn*/ } /*ns3*/ |
| 21 | |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 22 | /** |
| 23 | * @brief NS-3 namespace |
| 24 | */ |
| 25 | namespace ns3 { |
| 26 | |
| 27 | /** |
| 28 | * @brief ndnSIM namespace |
| 29 | */ |
| 30 | namespace ndn { |
| 31 | } |
| 32 | |
| 33 | } |
| 34 | |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 35 | NDN_NAMESPACE_BEGIN |
| 36 | |
| 37 | typedef Time TimeInterval; |
| 38 | |
| 39 | namespace time |
| 40 | { |
| 41 | |
| 42 | inline Time |
| 43 | NowUnixTimestamp () |
| 44 | { |
| 45 | return Simulator::Now (); |
| 46 | } |
| 47 | |
| 48 | } |
| 49 | |
| 50 | NDN_NAMESPACE_END |
| 51 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 52 | #endif // NDN_COMMON_H |