If you want to measure the passage of time, you can use a clock.
So far as I know, a clock must be a physical entity made of matter.
If you assume no matter, there can be no clocks, so no way to measure the passage of time.
I cannot think of a way to make a clock out of photons alone...