Junxiao Shi | 61c5ef3 | 2014-01-24 20:59:30 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_CORE_TIME_H |
| 8 | #define NFD_CORE_TIME_H |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | |
| 12 | namespace ndn { |
| 13 | namespace time { |
| 14 | |
| 15 | /** \class Duration |
| 16 | * \brief represents a time interval |
| 17 | * Time unit is nanosecond. |
| 18 | */ |
| 19 | typedef int64_t Duration; |
| 20 | |
| 21 | /** \class Point |
| 22 | * \brief represents a point in time |
| 23 | * This uses monotonic clock. |
| 24 | */ |
| 25 | typedef Duration Point; |
| 26 | |
| 27 | /// \return{ the current time in monotonic clock } |
| 28 | Point |
| 29 | now(); |
| 30 | |
| 31 | } // namespace time |
| 32 | } // namespace ndn |
| 33 | |
| 34 | #endif // NFD_CORE_TIME_H |