stupid question

i had sex yesterday while on my period and the condom broke, but im still bleeding but i feel like im going to throw up. do i still need to take a pregnancy test ? if so how long do i wait for a accurate result