Improvements to ecore timer docs.

SVN revision: 69115
This commit is contained in:
Jonas M. Gastal 2012-03-09 19:21:52 +00:00
parent 7c7a6bade4
commit faa433a789
2 changed files with 21 additions and 9 deletions

View File

@ -1246,9 +1246,20 @@ EAPI double ecore_loop_time_get(void);
/** /**
* @defgroup Ecore_Timer_Group Ecore Timer functions * @defgroup Ecore_Timer_Group Ecore Timer functions
* *
* Functions to create events based on timers. * Ecore provides very flexible timer functionality. The basic usage of timers,
* to call a certain function at a certain interval can be achieved with a
* single line:
* @code
* Eina_Bool my_func(void *data) {
* do_funky_stuff_with_data(data);
* return EINA_TRUE;
* }
* ecore_timer_add(interval_in_seconds, my_func, data_given_to_function);
* @endcode
* @note If the function was to be executed only once simply return EINA_FALSE
* instead.
* *
* Examples: * An example that shows the usage of a lot of these:
* @li @ref ecore_timer_example_c * @li @ref ecore_timer_example_c
* *
* @ingroup Ecore_Main_Loop_Group * @ingroup Ecore_Main_Loop_Group

View File

@ -73,12 +73,15 @@ ecore_timer_precision_get(void)
} }
/** /**
* Sets the precision to be used by timer infrastructure. * @brief Sets the precision to be used by timer infrastructure.
* *
* When system calculates time to expire the next timer we'll be able * @param value allowed introduced timeout delay, in seconds.
* to delay the timer by the given amount so more timers will fit in *
* the same dispatch, waking up the system less often and thus being * This sets the precision for @b all timers. The precision determines how much
* able to save power. * of an difference from the requested interval is acceptable. One common reason
* to use this function is to @b increase the allowed timeout and thus @b
* decrease precision of the timers, this is because less precise the timers
* result in the system waking up less often and thus consuming less resources.
* *
* Be aware that kernel may delay delivery even further, these delays * Be aware that kernel may delay delivery even further, these delays
* are always possible due other tasks having higher priorities or * are always possible due other tasks having higher priorities or
@ -93,8 +96,6 @@ ecore_timer_precision_get(void)
* @note Ecore is smart enough to see if there are timers in the * @note Ecore is smart enough to see if there are timers in the
* precision range, if it does not, in our example if no second timer * precision range, if it does not, in our example if no second timer
* in (T + precision) existed, then it would use the minimum timeout. * in (T + precision) existed, then it would use the minimum timeout.
*
* @param value allowed introduced timeout delay, in seconds.
*/ */
EAPI void EAPI void
ecore_timer_precision_set(double value) ecore_timer_precision_set(double value)