def current_time_ms():
 now = datetime.datetime.utcnow()
 new_microsecond = (int((now.microsecond / 1000)) * 1000)
 return now.replace(microsecond=new_microsecond)

def current_time_ms ( ) : now = datetime . datetime . utcnow ( ) new_microsecond = ( int ( ( now . microsecond / 1000 ) ) * 1000 ) return now . replace ( microsecond = new_microsecond )
gets the current time with millisecond precision .