PINE64
getrusage(2) time precision is 1 ms, not 1 μs - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101)
+--- Thread: getrusage(2) time precision is 1 ms, not 1 μs (/showthread.php?tid=6381)



getrusage(2) time precision is 1 ms, not 1 μs - lucho - 08-10-2018

The ru_utime.tv_usec member of the rusage structure for the getrusage(2) system call with RUSAGE_SELF manifest constant returns times that are multiple of 1000 with the Ayufan's kernel. That is, their precision is 1 ms, not 1 μs as for example for the BCM2708, A10, H3, BCM2837 and EX5422 SoC. I haven't studied the manual of the RK3399, but it seems very unlikely that it doesn't have a high-precision timer (counter), if all these SoC's have one. Is it possible to support it in the future kernel releases in order to obtain the aforementioned microsecond time precision? Thanks in advance!