time.cpp File Reference
#include "ndn-cxx/util/time.hpp"
#include "ndn-cxx/util/time-custom-clock.hpp"
#include <boost/date_time/posix_time/posix_time.hpp>
#include <sstream>
+ Include dependency graph for time.cpp:

Go to the source code of this file.

Namespaces

 boost
 
 boost::chrono
 
 ndn
 
 ndn::time
 

Typedefs

typedef boost::chrono::steady_clock ndn::time::base_steady_clock
 

Functions

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...
 
void ndn::time::setCustomClocks (shared_ptr< CustomSteadyClock > steadyClock=nullptr, shared_ptr< CustomSystemClock > systemClock=nullptr)
 Set custom system and steady clocks. 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...
 
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...