Skip to content

Instantly share code, notes, and snippets.

@sangramanand
Created July 26, 2012 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sangramanand/3183604 to your computer and use it in GitHub Desktop.
Save sangramanand/3183604 to your computer and use it in GitHub Desktop.
Java Time difference using JODA
Java Time difference using JODA
DateTime beforeCall = new DateTime();
Map<String, Map<String, String>> info = Maps.newHashMap();
Interval interval = new Interval(beforeCall, new Instant());
System.out.println("new call difference = "+interval.toDurationMillis());
DateTime beforeCall1 = new DateTime();
allAdmins = adminDAO.getAll();
Interval interval1 = new Interval(beforeCall1, new Instant());
System.out.println("old call difference = "+interval1.toDurationMillis());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment