Get the current cpu frequency on iMX6

I have a Windows Embedded Compact 2013 with iMX6. I would like to get the current cpu frequency of iMX6. Is it possible to get current frequency over API (C++)?

In the clock library there is an imx6-specific function named:
If you did not enable DVFS it will return fixed frequency, otherwise it will return the current CPU frequency configured by the DVFS system.