*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "avformat.h"
-#ifdef CONFIG_WIN32
+#if defined(CONFIG_WINCE)
+/* Skip includes on WinCE. */
+#elif defined(__MINGW32__)
#include <sys/types.h>
#include <sys/timeb.h>
#elif defined(CONFIG_OS2)
#endif
#include <time.h>
+/**
+ * gets the current time in micro seconds.
+ */
int64_t av_gettime(void)
{
-#ifdef CONFIG_WIN32
- struct _timeb tb;
+#if defined(CONFIG_WINCE)
+ return timeGetTime() * int64_t_C(1000);
+#elif defined(__MINGW32__)
+ struct timeb tb;
_ftime(&tb);
return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
#else
#endif
}
+#if !defined(CONFIG_WINCE)
#if !defined(HAVE_LOCALTIME_R)
struct tm *localtime_r(const time_t *t, struct tm *tp)
{
struct tm *l;
-
+
l = localtime(t);
if (!l)
return 0;
return tp;
}
#endif /* !defined(HAVE_LOCALTIME_R) */
+#endif /* !defined(CONFIG_WINCE) */