Use ElapsedTimer in Document instead of doubles
Document stores a timestamp for the moment it was created in order to compute the elapsed time whenever required. This looks like the perfect use case for base::ElapsedTimer. We wouldn't have to convert from double to int anymore. Actually we can go further and completely get rid of int downcasts as well and operate always in terms of base::TimeDelta. Document::ElapsedTime() returns a base::TimeDelta from now on and it was also moved to the private section as it isn't used from the outside. Bug: 979137 Change-Id: I2a3ede41fa947c400769ad21c515eefb857b7fbe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679755Reviewed-by:Jeremy Roman <jbroman@chromium.org> Commit-Queue: Sergio Villar <svillar@igalia.com> Cr-Commit-Position: refs/heads/master@{#676947}
Showing
Please register or sign in to comment