GLib.DateTime.prototype.difference

function difference(begin: GLib.DateTime): GLib.TimeSpan {
    // Gjs wrapper for g_date_time_difference()
}
  

Calculates the difference in time between end and begin. The GLib.TimeSpan that is returned is effectively end - begin (ie: positive if the first parameter is larger).

Since 2.26

begin

a GLib.DateTime

Returns

the difference between the two GLib.DateTime, as a time span expressed in microseconds.