Package totalcross.profiling
Class CallsCounter
- java.lang.Object
-
- totalcross.profiling.CallsCounter
-
public class CallsCounter extends java.lang.ObjectThis class counts how many times it was called per second. This can be really useful to profile whether a certain block of code is being executed too often. Usage: private static CallsCounter counter; public void someMethod() { if (counter == null) { counter = new CallsCounter("someMethod"); } counter.Update(); // some method's code... }- Since:
- TotalCross 4.2
-
-
Constructor Summary
Constructors Constructor Description CallsCounter(java.lang.String identifier)Creates a new CallsCounter object with the given identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidUpdate()
-