2003-09-23 01:09:32 -07:00
|
|
|
#include "ecore_private.h"
|
|
|
|
#include "Ecore.h"
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
/**
|
2004-09-22 21:58:16 -07:00
|
|
|
* Retrieves the current system time as a floating point value in seconds.
|
|
|
|
* @return The number of seconds since 12.00AM 1st January 1970.
|
|
|
|
* @ingroup Ecore_Time_Group
|
2003-09-23 01:09:32 -07:00
|
|
|
*/
|
|
|
|
double
|
|
|
|
ecore_time_get(void)
|
|
|
|
{
|
|
|
|
struct timeval timev;
|
|
|
|
|
|
|
|
gettimeofday(&timev, NULL);
|
|
|
|
return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
|
|
|
|
}
|