Flushing out thc

So for a while now I had been smoking thc to calm my anxiety, I would take only about 2 hits everyday and smoke half a gram every week. But in about 4 weeks i have to do a drug test for work and my anxiety is through the roof. Obviously I stopped smoking this week and just been drinking water and exercising. How long will the thc be out of my system ?! I need help