How do I change the duration of a UParticleSystem?

Hey! I am new to programming in UE4. In my game, I am trying to create a small gunSmoke effect that comes out of the barrel of a gun after it has been fired. I managed to get a nice particle and the code set up to instantiate it, but I have no idea of how to get rid of it. Is there a way to set a time for the emmitter to stop spawning particles? Here is what I am using to spawn the particles:

if (gunSmoke != NULL)
				gunSmoke, //UParticleSystem*
				FVector(0, 0, 0), //relative offset 
				FRotator(0, 0, 0), //relative rotation
				true //auto delete on completion

The answer is simple: Use a UParticleSystemComponent, because that has the ->DeactivateSystem call.