NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
time.hpp File Reference
#include "../common.hpp"
#include <boost/chrono.hpp>
#include <boost/asio/time_traits.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
Include dependency graph for time.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ndn::time::system_clock
 System clock. More...
 
class  ndn::time::steady_clock
 Steady clock. More...
 
struct  boost::chrono::clock_string< ndn::time::system_clock, CharT >
 
struct  boost::chrono::clock_string< ndn::time::steady_clock, CharT >
 

Namespaces

 ndn
 Copyright (c) 2011-2015 Regents of the University of California.
 
 ndn::time
 
 boost
 Copyright (c) 2013-2016 Regents of the University of California.
 
 boost::chrono
 

Typedefs

typedef duration< boost::int_least32_t, boost::ratio< 86400 > > ndn::time::days
 

Functions

template<typename Rep , typename Period , typename = typename std::enable_if<std::numeric_limits<Rep>::is_signed>::type>
constexpr duration< Rep, Period > ndn::time::abs (duration< Rep, Period > d)
 
const system_clock::TimePoint & ndn::time::getUnixEpoch ()
 Get system_clock::TimePoint representing UNIX time epoch (00:00:00 on Jan 1, 1970) More...
 
milliseconds ndn::time::toUnixTimestamp (const system_clock::TimePoint &point)
 Convert system_clock::TimePoint to UNIX timestamp. More...
 
system_clock::TimePoint ndn::time::fromUnixTimestamp (const milliseconds &duration)
 Convert UNIX timestamp to system_clock::TimePoint. More...
 
std::string ndn::time::toIsoString (const system_clock::TimePoint &timePoint)
 Convert to the ISO string representation of the time (YYYYMMDDTHHMMSS,fffffffff) More...
 
system_clock::TimePoint ndn::time::fromIsoString (const std::string &isoString)
 Convert from the ISO string (YYYYMMDDTHHMMSS,fffffffff) representation to the internal time format. More...
 
std::string ndn::time::toString (const system_clock::TimePoint &timePoint, const std::string &format="%Y-%m-%d %H:%M:%S", const std::locale &locale=std::locale("C"))
 Convert time point to string with specified format. More...
 
system_clock::TimePoint ndn::time::fromString (const std::string &formattedTimePoint, const std::string &format="%Y-%m-%d %H:%M:%S", const std::locale &locale=std::locale("C"))
 Convert from string of specified format into time point. More...