Reading current time from a czml file

Hi!

I have to read the current time (clock) on a czml file, is there some exemple?

Thanks in advance

let czml = ‘data/gps.czml’

viewer.dataSources.add(Cesium.CzmlDataSource.load(czml)).then(function(ds) {

viewer.trackedEntity = ds.entities.getById(‘path’);

viewer.clock.shouldAnimate = true;

});

You should be able to get start/stop/current time all from the clock property of the loaded datasource:

https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html?classFilter=CZML#clock