When is the right time to give up?

Still a newbie and would like to ask when do you guys decide to ask help? or look at google?

I'm trying to build like a clock at the moment and trying to build it without looking in google or looking at other people's work.

Currently. I'm losing and my brain hurts xD

EDIT: Thanks to all of the people who answered here. I never thought that usingngoogle is just fine, I thought I was cheating or something, hahah.