infdahai opened a new issue, #1466:
URL: https://github.com/apache/incubator-kvrocks/issues/1466

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-kvrocks/issues) and found no 
similar issues.
   
   
   ### Motivation
   
   A repetitive question about #983.
   
   
https://github.com/apache/incubator-kvrocks/blob/635dd311e5d07007826ae5338eae4cefb88ccc55/src/common/time_util.h#L27-L32
   
   [system_clock from cpp 
ref](https://en.cppreference.com/w/cpp/chrono/system_clock) is a wall clock and 
[wall clock from cpp 
ref](https://en.cppreference.com/w/cpp/chrono/steady_clock) is a monotonic 
clock. 
   I find this function is widely used in scenarios related to `ttl`. Maybe the 
monotonic one is better because the wall clock exists the problem of time 
adjustment and we only want a precise time interval.
   
   A related discussion from 
[stackoverflow](https://stackoverflow.com/questions/31552193/difference-between-steady-clock-vs-system-clock).
   >As opposed to the system_clock, which is not monotonic (i.e. the time can 
decrease if, say, the user changes the time on the host machine.)
   
   ### Solution
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to