Nanosecond Timestamping for Single-Photon-Counting Images