convertTimeFromTicks function nearly completed