Sperm Analysis

My Dr. wants to do a sperm analysis for my husband and he gave me a sample cup and the paper work to bring to the lab. I forgot to ask though how "fresh" does the sample need to be? Does it need to be brought in like within the hour or can my husband produce a sample at night and then bring it in in the morning?