MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / get_benchmark_time_stamps

Function get_benchmark_time_stamps

fftools/ffmpeg.c:937–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937static BenchmarkTimeStamps get_benchmark_time_stamps(void)
938{
939 BenchmarkTimeStamps time_stamps = { av_gettime_relative() };
940#if HAVE_GETRUSAGE
941 struct rusage rusage;
942
943 getrusage(RUSAGE_SELF, &rusage);
944 time_stamps.user_usec =
945 (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
946 time_stamps.sys_usec =
947 (rusage.ru_stime.tv_sec * 1000000LL) + rusage.ru_stime.tv_usec;
948#elif HAVE_GETPROCESSTIMES
949 HANDLE proc;
950 FILETIME c, e, k, u;
951 proc = GetCurrentProcess();
952 GetProcessTimes(proc, &c, &e, &k, &u);
953 time_stamps.user_usec =
954 ((int64_t)u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
955 time_stamps.sys_usec =
956 ((int64_t)k.dwHighDateTime << 32 | k.dwLowDateTime) / 10;
957#else
958 time_stamps.user_usec = time_stamps.sys_usec = 0;
959#endif
960 return time_stamps;
961}
962
963static int64_t getmaxrss(void)
964{

Callers 2

update_benchmarkFunction · 0.85
mainFunction · 0.85

Calls 1

av_gettime_relativeFunction · 0.85

Tested by

no test coverage detected