Class B question

I read the code in packet-forwarder. I found that beacon is highly relative with GPS mode. But I did not see any code that help the gateway to decide whether send the beacon or not. I only see the code that shows:

Does it mean that the pulse is generated by the GPS. Only the PPS pulse is generated that the gateway will send the beacon? Thanks in advance.