Class RealtimeClock
Defined in File realtime_clock.hpp
Base Type
public holoscan::Clock
(Class Clock)
-
class RealtimeClock : public holoscan::Clock
Real-time clock class.
The RealtimeClock respects the true duration of conditions such as
PeriodicCondition
. It is the default clock type used in Holoscan SDK.Public Functions
-
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<Resource, std::decay_t<ArgT>> && (std::is_same_v<Arg, std::decay_t<ArgT>> || std::is_same_v<ArgList, std::decay_t<ArgT>>)>>
inline RealtimeClock(ArgT &&arg, ArgsT&&... args)
- RealtimeClock() = default
- RealtimeClock(const std::string &name, nvidia::gxf::RealtimeClock *component)
- inline virtual const char *gxf_typename() const override
The underlying GXF component’s name.
-
virtual void setup(ComponentSpec &spec)
Define the resource specification.
- Parameters
spec – The reference to the component specification.
- virtual double time() const override
The current time of the clock. Time is measured in seconds.
- virtual int64_t timestamp() const override
The current timestamp of the clock. Timestamps are measured in nanoseconds.
- virtual void sleep_for(int64_t duration_ns) override
Waits until the given duration has elapsed on the clock.
- virtual void sleep_until(int64_t target_time_ns) override
Waits until the given target time.
- void set_time_scale(double time_scale)
Set the time scale of the clock. A value of 1.0 corresponds to realtime. Values larger than 1.0 cause time to run faster, while values less than 1.0 cause time to run more slowly.
- nvidia::gxf::RealtimeClock *get() const
-
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<Resource, std::decay_t<ArgT>> && (std::is_same_v<Arg, std::decay_t<ArgT>> || std::is_same_v<ArgList, std::decay_t<ArgT>>)>>