passing long difference into time function