Added remaining time function

I created the timeRemaining function based on timeElapsed function.