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

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

Namespaces

 boost
 
 boost::chrono
 
 ndn
 
 ndn::literals
 
 ndn::literals::time_literals
 
 ndn::time
 

Typedefs

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

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)
 
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...
 
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...
 
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...
 
system_clock::time_point ndn::time::fromUnixTimestamp (milliseconds duration)
 Convert UNIX timestamp to system_clock::time_point. More...
 
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...
 
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""_day (unsigned long long days)
 
constexpr time::duration< long double, time::days::period > ndn::literals::time_literals::operator""_days (long double days)
 
constexpr time::days ndn::literals::time_literals::operator""_days (unsigned long long days)
 
constexpr time::duration< long double, time::hours::period > ndn::literals::time_literals::operator""_h (long double hrs)
 
constexpr time::hours ndn::literals::time_literals::operator""_h (unsigned long long hrs)
 
constexpr time::duration< long double, time::minutes::period > ndn::literals::time_literals::operator""_min (long double mins)
 
constexpr time::minutes ndn::literals::time_literals::operator""_min (unsigned long long mins)
 
constexpr time::duration< long double, time::milliseconds::period > ndn::literals::time_literals::operator""_ms (long double msecs)
 
constexpr time::milliseconds ndn::literals::time_literals::operator""_ms (unsigned long long msecs)
 
constexpr time::duration< long double, time::nanoseconds::period > ndn::literals::time_literals::operator""_ns (long double nsecs)
 
constexpr time::nanoseconds ndn::literals::time_literals::operator""_ns (unsigned long long nsecs)
 
constexpr time::duration< long double, time::seconds::period > ndn::literals::time_literals::operator""_s (long double secs)
 
constexpr time::seconds ndn::literals::time_literals::operator""_s (unsigned long long secs)
 
constexpr time::duration< long double, time::microseconds::period > ndn::literals::time_literals::operator""_us (long double usecs)
 
constexpr time::microseconds ndn::literals::time_literals::operator""_us (unsigned long long usecs)
 
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...
 
std::string ndn::time::toIsoString (const system_clock::time_point &timePoint)
 Convert to the ISO 8601 string representation, basic format (YYYYMMDDTHHMMSS,fffffffff). 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...
 
milliseconds ndn::time::toUnixTimestamp (const system_clock::time_point &point)
 Convert system_clock::time_point to UNIX timestamp. More...