]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
timer: instance-status: rename method with real time
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 22 Jun 2022 03:05:26 +0000 (12:05 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Wed, 22 Jun 2022 03:20:14 +0000 (12:20 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/timer/alsatimer.map
src/timer/instance-status.c
src/timer/instance-status.h
tests/alsatimer-instance-status

index ed5a1a6f5aa6806b8650f8a0f5785192ad0ec910..8526879b9c5ee12e16701dc78038c1a22cb89476 100644 (file)
@@ -33,7 +33,7 @@ ALSA_GOBJECT_0_0_0 {
 
     "alsatimer_instance_status_get_type";
     "alsatimer_instance_status_new";
-    "alsatimer_instance_status_get_tstamp";
+    "alsatimer_instance_status_get_time";
   local:
     *;
 };
index 75e4dd956e310372ddbab298091d2485bdb3cfbf..8971d3ca64daf12f312c424ee8919d37c82fe406 100644 (file)
@@ -5,9 +5,9 @@
  * ALSATimerInstanceStatus:
  * A GObject-derived object to represent status of user instance.
  *
- * A [class@InstanceStatus] is a GObject-derived object to represent status of user instance
- * attached to any timer device or the other instance as slave. The call of
- * [method@UserInstance.get_status] returns the instance of object.
+ * A [class@InstanceStatus] is a GObject-derived object to express status of user instance attached
+ * to any timer device or the other instance as slave. The call of [method@UserInstance.get_status]
+ * returns the instance of object.
  *
  * The object wraps `struct snd_timer_status` in UAPI of Linux sound subsystem.
  */
@@ -117,27 +117,27 @@ static void alsatimer_instance_status_init(ALSATimerInstanceStatus *self)
 }
 
 /**
- * alsatimer_instance_status_get_tstamp:
+ * alsatimer_instance_status_get_time:
  * @self: A [class@InstanceStatus].
- * @tstamp: (array fixed-size=2)(out)(transfer none): The array with two elements for the seconds
- *          and nanoseconds parts of timestamp when the instance queues the latest event.
+ * @real_time: (array fixed-size=2)(out)(transfer none): The array with two elements for the
+ *             seconds and nanoseconds parts of timestamp when the instance queues the latest
+ *             event.
  *
- * Get timestamp for the latest event.
+ * Get real time at which the timer starts, stops, pauses, and continues.
  */
-void alsatimer_instance_status_get_tstamp(ALSATimerInstanceStatus *self,
-                                          const gint64 *tstamp[2])
+void alsatimer_instance_status_get_time(ALSATimerInstanceStatus *self, const gint64 *real_time[2])
 {
     ALSATimerInstanceStatusPrivate *priv;
 
     g_return_if_fail(ALSATIMER_IS_INSTANCE_STATUS(self));
     priv = alsatimer_instance_status_get_instance_private(self);
 
-    g_return_if_fail(tstamp != NULL);
+    g_return_if_fail(real_time != NULL);
 
     priv->tstamp[0] = (gint64)priv->status.tstamp.tv_sec;
     priv->tstamp[1] = (gint64)priv->status.tstamp.tv_nsec;
 
-    *tstamp = (const gint64 *)&priv->tstamp;
+    *real_time = (const gint64 *)&priv->tstamp;
 }
 
 /**
index 6eef60c02989d9a5026973997a8b25a6690cdd38..fad84fc612b10aeace1869e51ae27e2032f8574e 100644 (file)
@@ -17,8 +17,7 @@ struct _ALSATimerInstanceStatusClass {
 
 ALSATimerInstanceStatus *alsatimer_instance_status_new();
 
-void alsatimer_instance_status_get_tstamp(ALSATimerInstanceStatus *self,
-                                          const gint64 *tstamp[2]);
+void alsatimer_instance_status_get_time(ALSATimerInstanceStatus *self, const gint64 *real_time[2]);
 
 G_END_DECLS
 
index 440071740be5edc2c69a5c0a950ad00eed39c68e..19cf3cf760a747ee204d32b4d4571343339e375e 100644 (file)
@@ -18,7 +18,7 @@ props = (
 )
 methods = (
     'new',
-    'get_tstamp',
+    'get_time',
 )
 vmethods = ()
 signals = ()