blob: aa40cbd8139c80d393c7246ab5b7d66e7187045f [file] [log] [blame]
Spyridon Mastorakis86edf6f2014-11-14 19:27:18 -08001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2012-2014 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef NDNSIM_UTILS_TIME_HPP
20#define NDNSIM_UTILS_TIME_HPP
21
22#include "ns3/ndnSIM/model/ndn-common.hpp"
23
24#include <ndn-cxx/util/time-custom-clock.hpp>
25
26namespace ns3 {
27namespace ndn {
28namespace time {
29
30class CustomSystemClock : public CustomClock<system_clock> {
31public:
32 system_clock::time_point
33 getNow() const;
34
35 std::string
36 getSince() const;
37
38 boost::posix_time::time_duration
39 toPosixDuration(const system_clock::duration& duration) const;
40};
41
42class CustomSteadyClock : public CustomClock<steady_clock> {
43public:
44 steady_clock::time_point
45 getNow() const;
46
47 std::string
48 getSince() const;
49
50 boost::posix_time::time_duration
51 toPosixDuration(const steady_clock::duration& duration) const;
52};
53
54} // namespace time
55} // namespace ndn
56} // namespace ns3
57
58#endif // NDNSIM_UTILS_TIME_HPP