Cogl.get_clock_time

function get_clock_time(context: Cogl.Context): Number(gint64) {
    // Gjs wrapper for cogl_get_clock_time()
}
  

Returns the current time value from Cogl's internal clock. This clock is used for measuring times such as the presentation time in a Cogl.FrameInfo.

This method is meant for converting timestamps retrieved from Cogl to other time systems, and is not meant to be used as a standalone timing system. For that reason, if this function is called without having retrieved a valid (non-zero) timestamp from Cogl first, it may return 0 to indicate that Cogl has no active internal clock.

Since 1.14

context

a Cogl.Context pointer

Returns

the time value for the Cogl clock, in nanoseconds from an arbitrary point in time, or 0 if Cogl doesn't have an active internal clock.