Changed API so time returned instead of written to referenced parameter