NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
time.hpp File Reference
#include "ndn-cxx/detail/common.hpp"
#include <boost/asio/wait_traits.hpp>
#include <boost/chrono.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
 
 ndn::literals
 
 ndn::literals::time_literals
 
 boost
 
 boost::chrono
 

Typedefs

template<typename Rep , typename Period >
using ndn::time::duration = boost::chrono::duration< Rep, Period >
 
using ndn::time::days = duration< int_fast32_t, boost::ratio< 86400 > >
 
using ndn::time::weeks = duration< int_fast32_t, boost::ratio< 604800 > >
 
using ndn::time::months = duration< int_fast32_t, boost::ratio< 2629746 > >
 
using ndn::time::years = duration< int_fast32_t, boost::ratio< 31556952 > >
 
using ndn::time::hours = boost::chrono::hours
 
using ndn::time::minutes = boost::chrono::minutes
 
using ndn::time::seconds = boost::chrono::seconds
 
using ndn::time::milliseconds = boost::chrono::milliseconds
 
using ndn::time::microseconds = boost::chrono::microseconds
 
using ndn::time::nanoseconds = boost::chrono::nanoseconds
 

Functions

template<typename Rep , typename Period , typename = std::enable_if_t<std::numeric_limits<Rep>::is_signed>>
constexpr duration< Rep, Period > ndn::time::abs (duration< Rep, Period > d)
 
constexpr time::days ndn::literals::time_literals::operator"" _day (unsigned long long days)
 
constexpr time::duration< long double, time::days::period > ndn::literals::time_literals::operator"" _day (long double days)
 
constexpr time::days ndn::literals::time_literals::operator"" _days (unsigned long long days)
 
constexpr time::duration< long double, time::days::period > ndn::literals::time_literals::operator"" _days (long double days)
 
constexpr time::hours ndn::literals::time_literals::operator"" _h (unsigned long long hrs)
 
constexpr time::duration< long double, time::hours::period > ndn::literals::time_literals::operator"" _h (long double hrs)
 
constexpr time::minutes ndn::literals::time_literals::operator"" _min (unsigned long long mins)
 
constexpr time::duration< long double, time::minutes::period > ndn::literals::time_literals::operator"" _min (long double mins)
 
constexpr time::seconds ndn::literals::time_literals::operator"" _s (unsigned long long secs)
 
constexpr time::duration< long double, time::seconds::period > ndn::literals::time_literals::operator"" _s (long double secs)
 
constexpr time::milliseconds ndn::literals::time_literals::operator"" _ms (unsigned long long msecs)
 
constexpr time::duration< long double, time::milliseconds::period > ndn::literals::time_literals::operator"" _ms (long double msecs)
 
constexpr time::microseconds ndn::literals::time_literals::operator"" _us (unsigned long long usecs)
 
constexpr time::duration< long double, time::microseconds::period > ndn::literals::time_literals::operator"" _us (long double usecs)
 
constexpr time::nanoseconds ndn::literals::time_literals::operator"" _ns (unsigned long long nsecs)
 
constexpr time::duration< long double, time::nanoseconds::period > ndn::literals::time_literals::operator"" _ns (long double nsecs)
 
const system_clock::time_point & ndn::time::getUnixEpoch ()
 Return a system_clock::time_point representing the UNIX time epoch, i.e., 00:00:00 UTC on 1 January 1970. More...
 
milliseconds ndn::time::toUnixTimestamp (const system_clock::time_point &point)
 Convert system_clock::time_point to UNIX timestamp. More...
 
system_clock::time_point ndn::time::fromUnixTimestamp (milliseconds duration)
 Convert UNIX timestamp to system_clock::time_point. More...
 
std::string ndn::time::toIsoString (const system_clock::time_point &timePoint)
 Convert to the ISO 8601 string representation, basic format (YYYYMMDDTHHMMSS,fffffffff). More...
 
system_clock::time_point ndn::time::fromIsoString (const std::string &isoString)
 Convert from the ISO 8601 basic string format (YYYYMMDDTHHMMSS,fffffffff) to the internal time format. More...
 
std::string ndn::time::toIsoExtendedString (const system_clock::time_point &timePoint)
 Convert to the ISO 8601 string representation, extended format (YYYY-MM-DDTHH:MM:SS,fffffffff). More...
 
system_clock::time_point ndn::time::fromIsoExtendedString (const std::string &isoString)
 Convert from the ISO 8601 extended string format (YYYY-MM-DDTHH:MM:SS,fffffffff) to the internal time format. More...
 
std::string ndn::time::toString (const system_clock::time_point &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::time_point ndn::time::fromString (const std::string &timePointStr, 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...