Time-resolved investigation of plasma parameters during deposition of Ti and TiO2 thin films