Added getDuration to calculate Duration of TimeBlock.