Time support in VTK/Paraview

From my C++ code for a scientific simulation, I’m exporting .vtp files to be visualized with paraview. Until now, I was using a constant time step length so the task was easy: I just named my files as out_i.vtp, imported the whole series in Paraview and animated them. Now, however, I’ve implemented an adaptive time step length, so that it is not guaranteed anymore that the output files are equally spaced.

I’m aware of the existence of this page, and i’ve read Chapter 11 in the VTK User Guide, but still I can’t exactly figure out where in VTK I can specify a time step that can then be read by paraview.

Also, I’ve seen that one could basically also create a collection by writing a XML file like that:

<VTKFile type="Collection" version="0.1" byte_order="LittleEndian">
  <Collection>
<DataSet timestep="0.01" group="" part="0" file="Foo_001.vtu"/>
<DataSet timestep=“0.02" group="" part="0" file=“Foo_002.vtu"/>
<DataSet timestep=“0.03" group="" part="0" file=“Foo_003.vtu"/>
  </Collection>
</VTKFile>

but that left me with an empty renderview in paraview.

What is the actual best practice to import vtk files in paraview with time support?

Use a .series file

https://gitlab.kitware.com/paraview/paraview/blob/v5.5.0/Documentation/release/ParaView-5.5.0.md#json-based-new-meta-file-format-for-series-added