Why java.lang.management isn’t available in android? (At least i know that)
I need the use of “getCurrentThreadCpuTime” from “ThreadMXBean” class but I need ManagementFactory in order to retrieve it.
Is there an alternative to that class in android?
I need the cpu time spent by my thread.
Thanks in advance
Leonardo
Android run on linux, so you can get the thread info from file /proc/$pid/stat.
You can read and analyse file /proc/$pid/stat to get the info you want.
How to analyse thread status