15 namespace duds {
namespace time {
namespace planetary {
17 using std::shared_ptr;
129 void add(
const duds::time::interstellar::SecondTime leapOn,
142 void set(
const duds::time::interstellar::SecondTime leapOn,
150 const duds::time::interstellar::SecondTime &when
180 const duds::time::interstellar::SecondTime time
192 shared_ptr<const LeapMap>
leapMap()
const;
shared_ptr< LeapMap > leaps
The leap seconds.
duds::time::interstellar::Seconds currentUntil() const
Returns the time when the leap second data may no longer be up to date.
void setCurrent(const duds::time::interstellar::Seconds when)
Sets a timestamp for when the leap second information becomes outdated.
std::chrono::duration< std::int64_t > Seconds
Stores a duration in seconds.
duds::general::Spinlock block
Used to make access and changes thread-safe.
duds::time::interstellar::Seconds leapSeconds(const duds::time::interstellar::SecondTime &when) const
Returns the sum of all leap seconds in use at the given time.
SecondClock::time_point SecondTime
A point in time in Interstellar Time stored in Seconds.
void add(const duds::time::interstellar::SecondTime leapOn, const duds::time::interstellar::Seconds additional=duds::time::interstellar::Seconds(1))
Adds new leap second(s) at the given time and adjusts existing records to match.
LeapSeconds()
Makes a new LeapSeconds object with no leap seconds and a current time as far in the past as possible...
std::map< duds::time::interstellar::SecondTime, duds::time::interstellar::Seconds > LeapMap
The data structure used to hold leap seconds.
Stores when leap seconds occur to allow conversions between Interstellar Time or TAI and planetary ti...
LeapMap leapMapCopy() const
Returns a copy of the current map of leap seconds.
duds::time::interstellar::Seconds currUntil
A time stamp indicating when the stored information may be outdated.
A simple spinlock following the lockable and timed lockable concepts so that it can be used with std:...
int readZoneinfo(const std::string &zoneinfo)
Reads the indicated zoneinfo database file.
LeapBounds getLeapBounds(const duds::time::interstellar::SecondTime time) const
Create a LeapBounds object with the data for the time period covered for the given time...
A container holding the number of leap seconds and the time bounds over which the leap seconds are ap...
shared_ptr< const LeapMap > leapMap() const
Returns a new shared pointer to the current map of leap seconds.