Analog: compute time difference with millisecond precission