-/**
- * gets the current time in micro seconds.
- */
-int64_t av_gettime(void)
-{
-#if defined(__MINGW32__)
- struct timeb tb;
- _ftime(&tb);
- return ((int64_t)tb.time * INT64_C(1000) + (int64_t)tb.millitm) * INT64_C(1000);
-#else
- struct timeval tv;
- gettimeofday(&tv,NULL);
- return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-#endif
-}
-
-#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;
- *tp = *l;
- return tp;
-}
-#endif /* !defined(HAVE_LOCALTIME_R) */
-
-#ifdef CONFIG_NETWORK