We obtain the probability distribution functions (PDFs) of the time that a Lagrangian tracer or a heavy inertial particle spends in vortical or strain-dominated regions of a turbulent flow, by carrying out direct numerical simulations of such particles advected by statistically steady, homogeneous, and isotropic turbulence in the forced, three-dimensional, incompressible Navier-Stokes equation. We use the two invariants, Q and R, of the velocity-gradient tensor to distinguish between vortical and strain-dominated regions of the flow and partition the Q-R plane into four different regions depending on the topology of the flow; out of these four regions two correspond to vorticity-dominated regions of the flow and two correspond to strain-dominated ones. We obtain Q and R along the trajectories of tracers and heavy inertial particles and find out the time tpers for which they remain in one of the four regions of the Q-R plane. We find that the PDFs of tpers display exponentially decaying tails for all four regions for tracers and heavy inertial particles. From these PDFs we extract characteristic time scales, which help us to quantify the time that such particles spend in vortical or strain-dominated regions of the flow. © 2016 American Physical Society.