Refactoring TimeDiff and Adds RSpec test.