The text is a common idiomatic expression that means time seems to pass quickly when one is engaged in enjoyable activities. It does not play on different meanings of a word or similar-sounding words for a humorous effect.
Time flies when you ' re having fun .