Roughtime: An alternative to NTP when you don't need extra precise time

Could anyone shine some light on how this can be used as a replacement for NTP?

In Roughtime or similar network time update implementation? Frank alludes to the possibility of replacing NTP with Roughtime. I’m not familiar with how it’s done in practice, but as far as I understand, a client uses the time obtained from a few NTP servers to set its system clock. In the case of Nerves, the client would be some device deployed in the field somewhere.

What I don’t understand is how important the monotonicity of the system clock (or lack thereof) is for a Nerves device

In Cloudflare’s docs there is a usage example in Go:

t0 := time.Now()
rt, err := roughtime.Get(&servers[0], attempts, timeout, nil)

...

t1, radius := rt.Now()
delta := t1.Sub(t0.Now())
now := func() time.Time {
  return time.Now().Add(delta)
}

First, it stores the current system time in t0. Then it sends a request to a Roughtime server, gets back the server’s time t1 and stores the difference between server and client system times in delta. The delta is then used to define a new function now which is supposed to be used as a replacement for time.Now().

My concern is that delta is itself a rough difference between client’s time and server’s time. In addition to the actual (objective) time difference it also includes the time it took to send a request to the server, get back a response and decode it. What if a subsequent request ends up being served faster? In that case, the client’s system clock may have to be shifted backwards.

How much of a problem is that in practice? Maybe that already happens routinely when using NTP, I just don’t know.