Class ManualClock

class ManualClock : public holoscan::Clock

Manual clock class.

The manual clock compresses time intervals, rather than waiting for specified durations (e.g. via PeriodicCondition). It is used mainly for testing applications.

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 ManualClock(ArgT &&arg, ArgsT&&... args)

ManualClock() = default

ManualClock(const std::string &name, nvidia::gxf::ManualClock *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.

© Copyright 2022-2023, NVIDIA. Last updated on Sep 13, 2023.