mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

Problem: time.Now() uses wall clock reading. See https://github.com/golang/go/blob/master/src/time/time.go#L17 "later time-telling operations use the wall clock reading, but later time-measuring operations, specifically comparisons and subtractions, use the monotonic clock reading." This can cause 'Return' to be before 'Call' and wrong order of operations from different clients. Solution: use same base time for all clients and only use 'time-measuring' operations to record timestamps for history. Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>