When should I test

My period is irregular. How long after having sex can I test without waiting on the missed period?