Separating sprites

how do i make a timer to time the amount of time it takes to get something done like in something like sprint game