created the time function for milliseconds (need to inplement it!)