Get real-time fps

I want to get real-time fps in cesium, I’ve set “viewer.scene.debugShowFramesPerSecond = true”, but I want to be able to get the value it displays and print it on the console. What should I do? Thanks in advance!