mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Check for getrusage
Originally committed as revision 9627 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0f69ca7f14
commit
66be5b4536
3
configure
vendored
3
configure
vendored
@ -667,6 +667,7 @@ HAVE_LIST="
|
|||||||
fast_unaligned
|
fast_unaligned
|
||||||
fork
|
fork
|
||||||
freetype2
|
freetype2
|
||||||
|
getrusage
|
||||||
imlib2
|
imlib2
|
||||||
inet_aton
|
inet_aton
|
||||||
lrintf
|
lrintf
|
||||||
@ -1596,6 +1597,8 @@ elif check_func dlopen -ldl; then
|
|||||||
ldl=-ldl
|
ldl=-ldl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_func getrusage
|
||||||
|
|
||||||
check_func fork
|
check_func fork
|
||||||
|
|
||||||
test "$vhook" = "default" && vhook="$dlopen"
|
test "$vhook" = "default" && vhook="$dlopen"
|
||||||
|
2
ffmpeg.c
2
ffmpeg.c
@ -3113,10 +3113,12 @@ static int64_t getutime(void)
|
|||||||
#else
|
#else
|
||||||
static int64_t getutime(void)
|
static int64_t getutime(void)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_GETRUSAGE
|
||||||
struct rusage rusage;
|
struct rusage rusage;
|
||||||
|
|
||||||
getrusage(RUSAGE_SELF, &rusage);
|
getrusage(RUSAGE_SELF, &rusage);
|
||||||
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
|
return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user