timer: Improve duration api
- rename duration setter - add duration getter
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
5475df20c6
commit
50e675da05
+17
-2
@@ -262,8 +262,8 @@ gcal_timer_is_running (GcalTimer *self)
|
||||
* Changes the duration between two events.
|
||||
*/
|
||||
void
|
||||
gcal_timer_set_duration (GcalTimer *self,
|
||||
gint64 duration)
|
||||
gcal_timer_set_default_duration (GcalTimer *self,
|
||||
gint64 duration)
|
||||
{
|
||||
gint64 now;
|
||||
|
||||
@@ -283,6 +283,21 @@ gcal_timer_set_duration (GcalTimer *self,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gcal_timer_get_default_duration:
|
||||
* @self: The #GcalTimer.
|
||||
*
|
||||
* Returns the default duration.
|
||||
*/
|
||||
gint64
|
||||
gcal_timer_get_default_duration (GcalTimer *self)
|
||||
{
|
||||
g_return_val_if_fail (self != NULL, -1);
|
||||
|
||||
return self->default_duration;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gcal_timer_set_callback:
|
||||
* @self: The #GcalTimer.
|
||||
|
||||
Reference in New Issue
Block a user