As you can see in the picture below, with Firebase Monitoring SDK you can discover how much user time and system time your app consumes. Check it here
The picture is for an iPhone device, but the document says Android devices are supported too.
So I'm sure there is a way to get this data programmatically as Firebase does. I want to know how does Firebase discover this information.
Thanks in advance.