Download

Support

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_Timerecore_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.

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(), and ecore_timer_add().

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 func returns 1, the timer is rescheduled for the next interval in.
data Data to pass to func when it is called.
Returns:
A timer object on success. NULL on failure.
This function adds a timer and returns its handle on success and NULL on failure. The function 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 0. 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(), ecore_exe_kill(), and ecore_exe_terminate().

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. NULL is returned if the function is unsuccessful.
Note: 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(), ecore_exe_kill(), and ecore_exe_terminate().

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.


Copyright © Enlightenment.org

Ecore Documentation