Sentence 1: We had a wonderful time at the party.
Sentence 2: He had a time holding back the tears.
Does time mean the same thing in these two sentences?
the same meaning