plan b?

this may be a stupid question so please no harsh comments but I just want to be on the safe side. if I had unprotected sex last night and this morning and took plan b later today, would i be ok? I mean, not get pregnant? thanks ☺