have a good / hard time 后应接doing sth.为分词短语作定语(其前实际上省略了介词in),意为“度过了做某事的快乐/艰难时光”。
“have a good time ”和“have a hard time”后接“doing sth.”此外包括“have a great time”“have a difficult time”等形式的词组后都跟“doing sth. ”
是doing sth还有就是time后面省略了with
两个都可以
doing sth