Saving times to memory