How to get TimeWindows to when Draw Hits?

Hi all,
I’d love to draw a movie of trajectory and the Detector should hits after the hits time.
using rich trajectory works for the tracks. as examples in movies.
How to set sensitive detectors hits by timeWindows? Should I use a global variable?

void MyHit::Draw() {
    extern G4double gDrawTime;  // How to get it from /vis/viewer/set/timeWindow/startTime?


    auto visManager = G4VVisManager::GetConcreteInstance();
    if(!visManager) return;

    G4Circle c(pos);
    c.SetWorldSize(5*mm);

    G4VisAttributes att;

    if (time < gDrawTime)
        att.SetColour(G4Colour(1, 0, 0));
    else
        att.SetColour(G4Colour(0, 1, 0));

    c.SetVisAttributes(&att);
    visManager->Draw(c);
}