This uses sched_getcpu(2) to find the CPU we are scheduled on and then cpufreq(4) to find the frequency of that CPU. The caller is responsible for pinning the thread to one CPU and/or disabling frequency scaling if a consistent result is required.
This uses sched_getcpu(2) to find the CPU we are scheduled on and then cpufreq(4) to find the frequency of that CPU. The caller is responsible for pinning the thread to one CPU and/or disabling frequency scaling if a consistent result is required.