Tell me what you’re doing in your 45 minutes at the gym, and then I’ll tell you if it matters.
Of course, the length of time you workout for matters, but, only in conjunction with other variables. Not by itself.
I wear a watch while training to time my rest time, in between sets. Not to time how long I’m training for.
Your total volume of work, and rest time during that work, will be different from mine.
But if you don’t know what the total volume is, in relation to what your maximal capacity is, and if you’re not paying attention to your rest time in between sets, then, you might be wasting time and effort.