Hard time has 3 different meanings across 1 category:
Noun
a difficulty that can be overcome with effort
"we had a hard time getting here"
"analysts predicted rough sledding for handset makers"
a term served in a maximum security prison
Difficulties; a difficult time; trouble.