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 | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 22 | NDN_NAMESPACE_BEGIN |
| 23 | |
| 24 | typedef Time TimeInterval; |
| 25 | |
| 26 | namespace time |
| 27 | { |
| 28 | |
| 29 | inline Time |
| 30 | NowUnixTimestamp () |
| 31 | { |
| 32 | return Simulator::Now (); |
| 33 | } |
| 34 | |
| 35 | } |
| 36 | |
| 37 | NDN_NAMESPACE_END |
| 38 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 39 | #endif // NDN_COMMON_H |