Ecore Time Functions
Functions that deal with time. More...Functions | |
| EAPI double | ecore_time_get (void) |
| Retrieves the current system time as a floating point value in seconds. | |
| EAPI Ecore_Timer * | ecore_timer_add (double in, int(*func)(void *data), const void *data) |
| Creates a timer to call the given function in the given period of time. | |
| EAPI void * | ecore_timer_del (Ecore_Timer *timer) |
| Delete the specified timer from the timer list. | |
| EAPI void | ecore_timer_interval_set (Ecore_Timer *timer, double in) |
| Change the interval the timer ticks of. | |
| EAPI void | ecore_timer_delay (Ecore_Timer *timer, double add) |
| Add some delay for the next occurence of a timer. | |
| EAPI double | ecore_timer_pending_get (Ecore_Timer *timer) |
| Get the pending time regarding a timer. | |
Detailed Description
Functions that deal with time.These functions include those that simply retrieve it in a given format, and those that create events based on it.
Function Documentation
| EAPI double ecore_time_get | ( | void | ) |
Retrieves the current system time as a floating point value in seconds.
- Returns:
- The number of seconds since 12.00AM 1st January 1970.
Referenced by ecore_evas_fb_new(), ecore_timer_add(), and ecore_timer_pending_get().
| EAPI Ecore_Timer* ecore_timer_add | ( | double | in, | |
| int(*)(void *data) | func, | |||
| const void * | data | |||
| ) |
Creates a timer to call the given function in the given period of time.
- Parameters:
-
in The interval in seconds. func The given function. If funcreturns 1, the timer is rescheduled for the next intervalin.data Data to pass to funcwhen it is called.
- Returns:
- A timer object on success.
NULLon failure.
func will be called every @ seconds. The function will be passed the data pointer as its parameter.
When the timer func is called, it must return a value of either 1 (or ECORE_CALLBACK_RENEW) or 0 (or ECORE_CALLBACK_CANCEL). If it returns 1, it will be called again at the next tick, or if it returns 0 it will be deleted automatically making any references/handles for it invalid.
References ecore_time_get().
Referenced by ecore_animator_add(), ecore_animator_frametime_set(), and ecore_exe_kill().
| EAPI void* ecore_timer_del | ( | Ecore_Timer * | timer | ) |
Delete the specified timer from the timer list.
- Parameters:
-
timer The timer to delete.
- Returns:
- The data pointer set for the timer when ecore_timer_add was called.
NULLis returned if the function is unsuccessful.
timer must be a valid handle. If the timer function has already returned 0, the handle is no longer valid (and does not need to be delete).
Referenced by ecore_animator_frametime_set(), ecore_exe_free(), and ecore_exe_kill().
| EAPI void ecore_timer_delay | ( | Ecore_Timer * | timer, | |
| double | add | |||
| ) |
Add some delay for the next occurence of a timer.
This doesn't affect the interval of a timer.
- Parameters:
-
timer The timer to change. add The dalay to add to the next iteration.
| EAPI void ecore_timer_interval_set | ( | Ecore_Timer * | timer, | |
| double | in | |||
| ) |
Change the interval the timer ticks of.
If set during a timer call, this will affect the next interval.
- Parameters:
-
timer The timer to change. in The interval in seconds.
| EAPI double ecore_timer_pending_get | ( | Ecore_Timer * | timer | ) |
Get the pending time regarding a timer.
- Parameters:
-
timer The timer to learn from.
References ecore_time_get().