Finished primeTime function