in alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb/AsyncRateLimiter.java [58:66]
private synchronized long nextDelayMs(long nowTimestampMs) {
// allow exactly 1 operation to pass the timestamp.
if (nextOperationTimestamp <= nowTimestampMs) {
nextOperationTimestamp = nowTimestampMs + delayBetweenAttempts;
return 0;
}
return nextOperationTimestamp - nowTimestampMs;
}