Have a time

To have trouble, to have a hard time.

My friend really had a time last night when her car stopped working.