Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Use rounding to calculate TTL
The previous code calculated TTL directly by int64 / time.Second or int64 / time.Millisecond, which could result in a calculation error of up to 1s/1ms. Now, using math.Round ensures that TTL is rounded to the nearest whole second/millisecond, improving the accuracy of the calculation.
- Loading branch information