time flies when youre having fun

To say time flies when youre having fun is a way of saying that you are having so much fun enjoying yourself that you lose track of time as when you are not paying attention to the time passing due to the distractions, it will pass very quickly. This is often used in a humorous way when talking about an activity that was particularly enjoyable, where it was very easy to lose track of time.