Extracted time difference calculator to its own class