You can use Joda Time Library.
Interval i = new Interval(oldTime, new Instant());
Joda has two concepts:
- Interval: It represents interval of time between two time instances i.e. 10 am and 12 am.
- Duration: It represents the length of duration i.e. 2 hours.