Skip to content

An easy to use library for formatting human readable time differences in many languages. You can try it for yourself. Just get the latest jtimecalc distribution and follow the tutorial in Documentation section.

License

Notifications You must be signed in to change notification settings

goodylabs/jtimecalc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

An easy to use library for formatting human readable time differences in many languages.

You can try it for yourself:

  import gbc.jtimecalc.TimeDifferenceCalculator;
  public class SimpleExample {
 
        public static void main(String[] args) {

                System.out.println("1. Starting operation");
                long startTime = System.currentTimeMillis();
 
                System.out.println("2. Invoking some time consuming method");
                try {
                        Thread.sleep(5000);
                } catch (InterruptedException e) {
                        e.printStackTrace();
                }

                System.out.println("3. Finishing operation");
                long endTime = System.currentTimeMillis();
 
                System.out.println("Result:");
 
                for (TimeDifferenceCalculator calc : TimeDifferenceCalculator.values()) {
                        System.out.println(calc + ": "
                                        + calc.getTimeDifferenceAsString(endTime, startTime)
                                        + " , type: " + calc.getType());
                }
 
        }
}

LICENSE

The jtimecalc library is licensed under MIT license.

About

An easy to use library for formatting human readable time differences in many languages. You can try it for yourself. Just get the latest jtimecalc distribution and follow the tutorial in Documentation section.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published