Home
last modified time | relevance | path

Searched refs:cputime_fd (Results 1 – 1 of 1) sorted by relevance

/external/google-benchmark/src/
Dsysinfo.cc319 static int cputime_fd = -1; in MyCPUUsageCPUTimeNsLocked() local
320 if (cputime_fd == -1) { in MyCPUUsageCPUTimeNsLocked()
321 cputime_fd = open("/proc/self/cputime_ns", O_RDONLY); in MyCPUUsageCPUTimeNsLocked()
322 if (cputime_fd < 0) { in MyCPUUsageCPUTimeNsLocked()
323 cputime_fd = -1; in MyCPUUsageCPUTimeNsLocked()
329 if (pread(cputime_fd, buff, sizeof(buff) - 1, 0) <= 0) { in MyCPUUsageCPUTimeNsLocked()
330 close(cputime_fd); in MyCPUUsageCPUTimeNsLocked()
331 cputime_fd = -1; in MyCPUUsageCPUTimeNsLocked()
336 close(cputime_fd); in MyCPUUsageCPUTimeNsLocked()
337 cputime_fd = -1; in MyCPUUsageCPUTimeNsLocked()