REPLACING all the energy SOURCES to their internal resistance and calculate the equivalent resistance as viewed from the terminal through which capacitor as connected i.e. A and B.
The equivalent circuit is GIVEN below:
R eq = 30 || (10 + 20)
or R eq = 15
Time constant ( )=Req. C = 15 C