diff --git a/.gitignore b/.gitignore
index 61aa582..5a7271a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,4 @@
 /test/internal_sdref
 /test/internal_utils
 /test/source_base
+/test/source_time
diff --git a/src/Makefile.am b/src/Makefile.am
index a027d5f..d4e7906 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,4 +24,7 @@
 nobase_include_HEADERS += sdeventplus/source/base.hpp
 libsdeventplus_la_SOURCES += sdeventplus/source/base.cpp
 
+nobase_include_HEADERS += sdeventplus/source/time.hpp
+libsdeventplus_la_SOURCES += sdeventplus/source/time.cpp
+
 nobase_include_HEADERS += sdeventplus/test/sdevent.hpp
diff --git a/src/sdeventplus/internal/sdevent.hpp b/src/sdeventplus/internal/sdevent.hpp
index 7713cb8..9a6ec07 100644
--- a/src/sdeventplus/internal/sdevent.hpp
+++ b/src/sdeventplus/internal/sdevent.hpp
@@ -17,6 +17,12 @@
     virtual sd_event* sd_event_ref(sd_event* event) const = 0;
     virtual sd_event* sd_event_unref(sd_event* event) const = 0;
 
+    virtual int sd_event_add_time(sd_event* event, sd_event_source** source,
+                                  clockid_t clock, uint64_t usec,
+                                  uint64_t accuracy,
+                                  sd_event_time_handler_t callback,
+                                  void* userdata) const = 0;
+
     virtual int sd_event_prepare(sd_event* event) const = 0;
     virtual int sd_event_wait(sd_event* event, uint64_t usec) const = 0;
     virtual int sd_event_dispatch(sd_event* event) const = 0;
@@ -57,6 +63,14 @@
                                             int* enabled) const = 0;
     virtual int sd_event_source_set_enabled(sd_event_source* source,
                                             int enabled) const = 0;
+    virtual int sd_event_source_get_time(sd_event_source* source,
+                                         uint64_t* usec) const = 0;
+    virtual int sd_event_source_set_time(sd_event_source* source,
+                                         uint64_t usec) const = 0;
+    virtual int sd_event_source_get_time_accuracy(sd_event_source* source,
+                                                  uint64_t* usec) const = 0;
+    virtual int sd_event_source_set_time_accuracy(sd_event_source* source,
+                                                  uint64_t usec) const = 0;
 };
 
 class SdEventImpl : public SdEvent
@@ -82,6 +96,15 @@
         return ::sd_event_unref(event);
     }
 
+    int sd_event_add_time(sd_event* event, sd_event_source** source,
+                          clockid_t clock, uint64_t usec, uint64_t accuracy,
+                          sd_event_time_handler_t callback,
+                          void* userdata) const override
+    {
+        return ::sd_event_add_time(event, source, clock, usec, accuracy,
+                                   callback, userdata);
+    }
+
     int sd_event_prepare(sd_event* event) const override
     {
         return ::sd_event_prepare(event);
@@ -196,6 +219,30 @@
     {
         return ::sd_event_source_set_enabled(source, enabled);
     }
+
+    int sd_event_source_get_time(sd_event_source* source,
+                                 uint64_t* usec) const override
+    {
+        return ::sd_event_source_get_time(source, usec);
+    }
+
+    int sd_event_source_set_time(sd_event_source* source,
+                                 uint64_t usec) const override
+    {
+        return ::sd_event_source_set_time(source, usec);
+    }
+
+    int sd_event_source_get_time_accuracy(sd_event_source* source,
+                                          uint64_t* usec) const override
+    {
+        return ::sd_event_source_get_time_accuracy(source, usec);
+    }
+
+    int sd_event_source_set_time_accuracy(sd_event_source* source,
+                                          uint64_t usec) const override
+    {
+        return ::sd_event_source_set_time_accuracy(source, usec);
+    }
 };
 
 extern SdEventImpl sdevent_impl;
diff --git a/src/sdeventplus/source/time.cpp b/src/sdeventplus/source/time.cpp
new file mode 100644
index 0000000..1a24604
--- /dev/null
+++ b/src/sdeventplus/source/time.cpp
@@ -0,0 +1,106 @@
+#include <cstdio>
+#include <sdeventplus/clock.hpp>
+#include <sdeventplus/exception.hpp>
+#include <sdeventplus/internal/utils.hpp>
+#include <sdeventplus/source/time.hpp>
+#include <type_traits>
+#include <utility>
+
+namespace sdeventplus
+{
+namespace source
+{
+
+template <ClockId Id>
+Time<Id>::Time(const Event& event, TimePoint time, Accuracy accuracy,
+               Callback&& callback) :
+    Base(event, create_source(event, time, accuracy), std::false_type()),
+    callback(std::move(callback))
+{
+}
+
+template <ClockId Id>
+typename Time<Id>::TimePoint Time<Id>::get_time() const
+{
+    uint64_t usec;
+    int r = event.getSdEvent()->sd_event_source_get_time(source.get(), &usec);
+    if (r < 0)
+    {
+        throw SdEventError(-r, "sd_event_source_get_time");
+    }
+    return Time<Id>::TimePoint(SdEventDuration(usec));
+}
+
+template <ClockId Id>
+void Time<Id>::set_time(TimePoint time) const
+{
+    int r = event.getSdEvent()->sd_event_source_set_time(
+        source.get(), SdEventDuration(time.time_since_epoch()).count());
+    if (r < 0)
+    {
+        throw SdEventError(-r, "sd_event_source_set_time");
+    }
+}
+
+template <ClockId Id>
+typename Time<Id>::Accuracy Time<Id>::get_accuracy() const
+{
+    uint64_t usec;
+    int r = event.getSdEvent()->sd_event_source_get_time_accuracy(source.get(),
+                                                                  &usec);
+    if (r < 0)
+    {
+        throw SdEventError(-r, "sd_event_source_get_time_accuracy");
+    }
+    return SdEventDuration(usec);
+}
+
+template <ClockId Id>
+void Time<Id>::set_accuracy(Accuracy accuracy) const
+{
+    int r = event.getSdEvent()->sd_event_source_set_time_accuracy(
+        source.get(), SdEventDuration(accuracy).count());
+    if (r < 0)
+    {
+        throw SdEventError(-r, "sd_event_source_set_time_accuracy");
+    }
+}
+
+template <ClockId Id>
+const typename Time<Id>::Callback& Time<Id>::get_callback() const
+{
+    return callback;
+}
+
+template <ClockId Id>
+sd_event_source* Time<Id>::create_source(const Event& event, TimePoint time,
+                                         Accuracy accuracy)
+{
+    sd_event_source* source;
+    int r = event.getSdEvent()->sd_event_add_time(
+        event.get(), &source, static_cast<clockid_t>(Id),
+        SdEventDuration(time.time_since_epoch()).count(),
+        SdEventDuration(accuracy).count(), timeCallback, nullptr);
+    if (r < 0)
+    {
+        throw SdEventError(-r, "sd_event_add_time");
+    }
+    return source;
+}
+
+template <ClockId Id>
+int Time<Id>::timeCallback(sd_event_source* source, uint64_t usec,
+                           void* userdata)
+{
+    return sourceCallback<Callback, Time, &Time::get_callback>(
+        "timeCallback", source, userdata, TimePoint(SdEventDuration(usec)));
+}
+
+template class Time<ClockId::RealTime>;
+template class Time<ClockId::Monotonic>;
+template class Time<ClockId::BootTime>;
+template class Time<ClockId::RealTimeAlarm>;
+template class Time<ClockId::BootTimeAlarm>;
+
+} // namespace source
+} // namespace sdeventplus
diff --git a/src/sdeventplus/source/time.hpp b/src/sdeventplus/source/time.hpp
new file mode 100644
index 0000000..28a42fb
--- /dev/null
+++ b/src/sdeventplus/source/time.hpp
@@ -0,0 +1,43 @@
+#pragma once
+
+#include <cstdint>
+#include <functional>
+#include <sdeventplus/clock.hpp>
+#include <sdeventplus/internal/utils.hpp>
+#include <sdeventplus/source/base.hpp>
+#include <systemd/sd-event.h>
+
+namespace sdeventplus
+{
+namespace source
+{
+
+template <ClockId Id>
+class Time : public Base
+{
+  public:
+    using TimePoint = typename Clock<Id>::time_point;
+    using Accuracy = SdEventDuration;
+    using Callback = std::function<void(Time& source, TimePoint time)>;
+
+    Time(const Event& event, TimePoint time, Accuracy accuracy,
+         Callback&& callback);
+
+    TimePoint get_time() const;
+    void set_time(TimePoint time) const;
+    Accuracy get_accuracy() const;
+    void set_accuracy(Accuracy accuracy) const;
+
+  private:
+    Callback callback;
+
+    const Callback& get_callback() const;
+
+    static sd_event_source* create_source(const Event& event, TimePoint time,
+                                          Accuracy accuracy);
+    static int timeCallback(sd_event_source* source, uint64_t usec,
+                            void* userdata);
+};
+
+} // namespace source
+} // namespace sdeventplus
diff --git a/src/sdeventplus/test/sdevent.hpp b/src/sdeventplus/test/sdevent.hpp
index 9b39d50..1e90bc7 100644
--- a/src/sdeventplus/test/sdevent.hpp
+++ b/src/sdeventplus/test/sdevent.hpp
@@ -17,6 +17,10 @@
     MOCK_CONST_METHOD1(sd_event_ref, sd_event*(sd_event*));
     MOCK_CONST_METHOD1(sd_event_unref, sd_event*(sd_event*));
 
+    MOCK_CONST_METHOD7(sd_event_add_time,
+                       int(sd_event*, sd_event_source**, clockid_t, uint64_t,
+                           uint64_t, sd_event_time_handler_t, void*));
+
     MOCK_CONST_METHOD1(sd_event_prepare, int(sd_event*));
     MOCK_CONST_METHOD2(sd_event_wait, int(sd_event*, uint64_t));
     MOCK_CONST_METHOD1(sd_event_dispatch, int(sd_event*));
@@ -51,6 +55,14 @@
     MOCK_CONST_METHOD2(sd_event_source_get_enabled,
                        int(sd_event_source*, int*));
     MOCK_CONST_METHOD2(sd_event_source_set_enabled, int(sd_event_source*, int));
+    MOCK_CONST_METHOD2(sd_event_source_get_time,
+                       int(sd_event_source*, uint64_t*));
+    MOCK_CONST_METHOD2(sd_event_source_set_time,
+                       int(sd_event_source*, uint64_t));
+    MOCK_CONST_METHOD2(sd_event_source_get_time_accuracy,
+                       int(sd_event_source*, uint64_t*));
+    MOCK_CONST_METHOD2(sd_event_source_set_time_accuracy,
+                       int(sd_event_source*, uint64_t));
 };
 
 } // namespace test
diff --git a/test/Makefile.am b/test/Makefile.am
index 4b94144..8fc2beb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -36,3 +36,8 @@
 source_base_SOURCES = source/base.cpp
 source_base_CPPFLAGS = $(gtest_cppflags)
 source_base_LDADD = $(gtest_ldadd)
+
+check_PROGRAMS += source_time
+source_time_SOURCES = source/time.cpp
+source_time_CPPFLAGS = $(gtest_cppflags)
+source_time_LDADD = $(gtest_ldadd)
diff --git a/test/source/time.cpp b/test/source/time.cpp
new file mode 100644
index 0000000..0ee612f
--- /dev/null
+++ b/test/source/time.cpp
@@ -0,0 +1,204 @@
+#include <cerrno>
+#include <chrono>
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <memory>
+#include <sdeventplus/clock.hpp>
+#include <sdeventplus/exception.hpp>
+#include <sdeventplus/source/time.hpp>
+#include <sdeventplus/test/sdevent.hpp>
+#include <systemd/sd-event.h>
+#include <time.h>
+#include <utility>
+
+namespace sdeventplus
+{
+namespace source
+{
+namespace
+{
+
+using testing::DoAll;
+using testing::Return;
+using testing::SaveArg;
+using testing::SetArgPointee;
+
+using UniqueEvent = std::unique_ptr<Event, std::function<void(Event*)>>;
+
+class TimeTest : public testing::Test
+{
+  protected:
+    testing::StrictMock<test::SdEventMock> mock;
+    sd_event_source* const expected_source =
+        reinterpret_cast<sd_event_source*>(1234);
+    sd_event* const expected_event = reinterpret_cast<sd_event*>(2345);
+    UniqueEvent event = make_event(expected_event);
+
+    UniqueEvent make_event(sd_event* event)
+    {
+        auto deleter = [this, event](Event* e) {
+            EXPECT_CALL(this->mock, sd_event_unref(event))
+                .WillOnce(Return(nullptr));
+            delete e;
+        };
+        return UniqueEvent(new Event(event, std::false_type(), &mock), deleter);
+    }
+
+    void expect_time_destroy(sd_event* event, sd_event_source* source)
+    {
+        {
+            testing::InSequence sequence;
+            EXPECT_CALL(mock, sd_event_source_set_enabled(source, SD_EVENT_OFF))
+                .WillOnce(Return(0));
+            EXPECT_CALL(mock, sd_event_source_unref(source))
+                .WillOnce(Return(nullptr));
+        }
+        EXPECT_CALL(mock, sd_event_unref(event)).WillOnce(Return(nullptr));
+    }
+};
+
+TEST_F(TimeTest, ConstructSuccess)
+{
+    constexpr ClockId id = ClockId::RealTime;
+    const Time<id>::TimePoint expected_time(std::chrono::seconds{2});
+    const Time<id>::Accuracy expected_accuracy(std::chrono::milliseconds{50});
+    Time<id>::TimePoint saved_time;
+    Time<id>::Callback callback = [&saved_time](Time<id>&,
+                                                Time<id>::TimePoint time) {
+        saved_time = time;
+    };
+
+    EXPECT_CALL(mock, sd_event_ref(expected_event))
+        .WillOnce(Return(expected_event));
+    sd_event_time_handler_t handler;
+    EXPECT_CALL(mock,
+                sd_event_add_time(expected_event, testing::_, CLOCK_REALTIME,
+                                  2000000, 50000, testing::_, nullptr))
+        .WillOnce(DoAll(SetArgPointee<1>(expected_source), SaveArg<5>(&handler),
+                        Return(0)));
+    void* userdata;
+    EXPECT_CALL(mock, sd_event_source_set_userdata(expected_source, testing::_))
+        .WillOnce(DoAll(SaveArg<1>(&userdata), Return(nullptr)));
+    Time<id> time(*event, expected_time, expected_accuracy,
+                  std::move(callback));
+    EXPECT_EQ(expected_event, time.get_event().get());
+    EXPECT_EQ(expected_source, time.get());
+
+    EXPECT_EQ(0, handler(nullptr, 2000100, userdata));
+    EXPECT_EQ(Time<id>::TimePoint(std::chrono::microseconds(2000100)),
+              saved_time);
+
+    expect_time_destroy(expected_event, expected_source);
+}
+
+TEST_F(TimeTest, ConstructError)
+{
+    constexpr ClockId id = ClockId::Monotonic;
+    const Time<id>::TimePoint expected_time(std::chrono::seconds{2});
+    const Time<id>::Accuracy expected_accuracy(std::chrono::milliseconds{50});
+    Time<id>::Callback callback = [](Time<id>&, Time<id>::TimePoint) {};
+
+    EXPECT_CALL(mock,
+                sd_event_add_time(expected_event, testing::_, CLOCK_MONOTONIC,
+                                  2000000, 50000, testing::_, nullptr))
+        .WillOnce(Return(-ENOSYS));
+    EXPECT_THROW(
+        Time<id>(*event, expected_time, expected_accuracy, std::move(callback)),
+        SdEventError);
+}
+
+class TimeMethodTest : public TimeTest
+{
+  protected:
+    static constexpr ClockId id = ClockId::BootTime;
+    std::unique_ptr<Time<id>> time;
+
+    void SetUp()
+    {
+        EXPECT_CALL(mock, sd_event_ref(expected_event))
+            .WillOnce(Return(expected_event));
+        EXPECT_CALL(mock, sd_event_add_time(expected_event, testing::_,
+                                            CLOCK_BOOTTIME, 2000000, 50000,
+                                            testing::_, nullptr))
+            .WillOnce(DoAll(SetArgPointee<1>(expected_source), Return(0)));
+        EXPECT_CALL(mock,
+                    sd_event_source_set_userdata(expected_source, testing::_))
+            .WillOnce(Return(nullptr));
+        time = std::make_unique<Time<id>>(
+            *event, Time<id>::TimePoint(std::chrono::seconds{2}),
+            std::chrono::milliseconds{50},
+            [](Time<id>&, Time<id>::TimePoint) {});
+    }
+
+    void TearDown()
+    {
+        expect_time_destroy(expected_event, expected_source);
+        time.reset();
+    }
+};
+
+TEST_F(TimeMethodTest, SetTimeSuccess)
+{
+    EXPECT_CALL(mock, sd_event_source_set_time(expected_source, 1000000))
+        .WillOnce(Return(0));
+    time->set_time(Time<id>::TimePoint(std::chrono::seconds{1}));
+}
+
+TEST_F(TimeMethodTest, SetTimeError)
+{
+    EXPECT_CALL(mock, sd_event_source_set_time(expected_source, 1000000))
+        .WillOnce(Return(-EINVAL));
+    EXPECT_THROW(time->set_time(Time<id>::TimePoint(std::chrono::seconds{1})),
+                 SdEventError);
+}
+
+TEST_F(TimeMethodTest, GetTimeSuccess)
+{
+    EXPECT_CALL(mock, sd_event_source_get_time(expected_source, testing::_))
+        .WillOnce(DoAll(SetArgPointee<1>(10), Return(0)));
+    EXPECT_EQ(Time<id>::TimePoint(std::chrono::microseconds{10}),
+              time->get_time());
+}
+
+TEST_F(TimeMethodTest, GetTimeError)
+{
+    EXPECT_CALL(mock, sd_event_source_get_time(expected_source, testing::_))
+        .WillOnce(Return(-ENOSYS));
+    EXPECT_THROW(time->get_time(), SdEventError);
+}
+
+TEST_F(TimeMethodTest, SetAccuracySuccess)
+{
+    EXPECT_CALL(mock,
+                sd_event_source_set_time_accuracy(expected_source, 5000000))
+        .WillOnce(Return(0));
+    time->set_accuracy(std::chrono::seconds{5});
+}
+
+TEST_F(TimeMethodTest, SetAccuracyError)
+{
+    EXPECT_CALL(mock,
+                sd_event_source_set_time_accuracy(expected_source, 5000000))
+        .WillOnce(Return(-EINVAL));
+    EXPECT_THROW(time->set_accuracy(std::chrono::seconds{5}), SdEventError);
+}
+
+TEST_F(TimeMethodTest, GetAccuracySuccess)
+{
+    EXPECT_CALL(mock,
+                sd_event_source_get_time_accuracy(expected_source, testing::_))
+        .WillOnce(DoAll(SetArgPointee<1>(1000), Return(0)));
+    EXPECT_EQ(std::chrono::milliseconds{1}, time->get_accuracy());
+}
+
+TEST_F(TimeMethodTest, GetAccuracyError)
+{
+    EXPECT_CALL(mock,
+                sd_event_source_get_time_accuracy(expected_source, testing::_))
+        .WillOnce(Return(-ENOSYS));
+    EXPECT_THROW(time->get_accuracy(), SdEventError);
+}
+
+} // namespace
+} // namespace source
+} // namespace sdeventplus
