Class ClockInterface
Defined in File clock.hpp
Derived Type
public holoscan::gxf::Clock
(Class Clock)
-
class ClockInterface
Pure interface defining clock functionality.
This interface defines the core clock operations that all clock implementations must provide.
Subclassed by holoscan::gxf::Clock
Public Functions
-
virtual ~ClockInterface() = default
-
virtual double time() const = 0
The current time of the clock. Time is measured in seconds.
-
virtual int64_t timestamp() const = 0
The current timestamp of the clock. Timestamps are measured in nanoseconds.
-
virtual void sleep_for(int64_t duration_ns) = 0
Waits until the given duration has elapsed on the clock.
-
template<typename Rep, typename Period>
inline void sleep_for(std::chrono::duration<Rep, Period> duration) Set a duration to sleep.
- Parameters
duration – The sleep duration of type
std::chrono::duration
.
-
virtual void sleep_until(int64_t target_time_ns) = 0
Waits until the given target time.
-
virtual ~ClockInterface() = default