base_clock

Base clock interface for Pipecat timing operations.

class pipecat.clocks.base_clock.BaseClock[source]

Bases: ABC

Abstract base class for clock implementations.

Provides a common interface for timing operations used in Pipecat for synchronization, scheduling, and time-based processing.

abstractmethod get_time() int[source]

Get the current time value.

Returns:

The current time as an integer value. The specific unit and reference point depend on the concrete implementation.

abstractmethod start()[source]

Start or initialize the clock.

Performs any necessary initialization or starts the timing mechanism. This method should be called before using get_time().