This library is used for developers to know the time elapsed in your project (Functions, Databases, Constructors ...).
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ElapsedTimeLib
README.md
Sample.png

README.md

ElapsedTime

This library is used by developers to know the time elapsed in your project (Functions, Databases, Constructors ...).

Usage

Add to your build.gradle:

    compile 'ElapsedTimeLib:ElapsedTimeLib:1.0.0'

Start ElapsedTime at the beginning of your function and Stop at the end:

		public void functionToTest {

        	ElapsedTime.getSharedInstance(context).start("functionToTest");

			doSomething();
			
			ElapsedTime.getSharedInstance(context).stop("functionToTest");

		}

Or customizing:

  • Enable Log
	ElapsedTime.getSharedInstance(context).setLogEnabled(false);
	
  • Log type
	ElapsedTime.getSharedInstance(context).setLogType(LOG_TYPE.DEBUG);
	
  • Set time in millis (default seconds)
	ElapsedTime.getSharedInstance(context).setMillis(true);
	
  • start and stop showing toast
		public void functionToTest {

        	ElapsedTime.getSharedInstance(context).start("functionToTest", true);

			doSomething();
			
			ElapsedTime.getSharedInstance(context).stop("functionToTest", true);

		}	

Credits & Contact

ElapsedTime was created by jcmore2@gmail.com

License

ElapsedTime is available under the Apache License, Version 2.0.