On this page:
get-time
clock-time?
clock-time-none
obtain-system-clock
time-as-seconds
time-as-milliseconds
time-as-microseconds
clock-diff
Inherited methods:
from gst-object%
get-name
get-parent
get-path-string
has-as-parent?
7.7

class

clock% : class?

  superclass: gst-object%

GStreamer uses a global clock to synchronize the different parts of a pipeline. Different clock implementations inherit from clock%. The clock returns a monotonically increasing time with get-time. In GStreamer, time is always expressed in nanoseconds.

method

(send a-clock get-time)  clock-time?

Gets the current time of a-clock. The time is always monotonically increasing.

procedure

(clock-time? v)  boolean?

  v : any/c
Returns #t if v is a number that can represent the time elapsed in a GStreamer pipeline, #f otherwise. All time in GStreamer is expressed in nanoseconds.

An undefined clock time. Often seen used as a timeout for procedures where it implies the procedure should block indefinitely.

procedure

(obtain-system-clock)  (is-a?/c clock%)

Obtain an instance of clock% based on the system time.

procedure

(time-as-seconds time)  exact-integer?

  time : clock-time?
Convert time to seconds.

procedure

(time-as-milliseconds time)  exact-integer?

  time : clock-time?
Convert time to milliseconds (1/1000 of a second).

procedure

(time-as-microseconds time)  exact-integer?

  time : clock-time?
Convert time to microseconds (1/1000000 of a second).

procedure

(clock-diff s e)  clock-time?

  s : clock-time?
  e : clock-time?
Calculate a difference between two clock times.