Processing sample code for Duration