summaryrefslogtreecommitdiff
path: root/extras/gudev/gudevdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/gudev/gudevdevice.c')
-rw-r--r--extras/gudev/gudevdevice.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/extras/gudev/gudevdevice.c b/extras/gudev/gudevdevice.c
index 8909178e4b..6f30d12d07 100644
--- a/extras/gudev/gudevdevice.c
+++ b/extras/gudev/gudevdevice.c
@@ -941,3 +941,24 @@ g_udev_device_get_is_initialized (GUdevDevice *device)
g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
return udev_device_get_is_initialized (device->priv->udevice);
}
+
+/**
+ * g_udev_device_get_usec_since_initialized:
+ * @device: A #GUdevDevice.
+ *
+ * Gets number of micro-seconds since @device was initialized.
+ *
+ * This only works for devices with properties in the udev
+ * database. All other devices return 0.
+ *
+ * Returns: Number of micro-seconds since @device was initialized or 0 if unknown.
+ *
+ * Since: 165
+ */
+guint64
+g_udev_device_get_usec_since_initialized (GUdevDevice *device)
+{
+ g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
+ return udev_device_get_usec_since_initialized (device->priv->udevice);
+}
+