Is there any way to do ACTUAL BPM rather than average?

I have used the code for average BPM but I dont see a way for actual BPM.