::scalehrtime could be more precise
Work by Bryan Cantrill.
Original comment by Bryan says:
For quite some time, we've had the ::scalehrtime dcmd (see OS-770). However, this is imprecise with respect to large values (e.g., TSC reads) because it doesn't follow the same algorithm as the kernel (which only converts values less than the tsc_tick interval). ::scalehrtime should mimic this, using a delta against tsc_last if the value to convert is closer to tsc_last than it is to 0.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit adabf61274801f4e57bf88d159c75b1993eeaf3c Author: Bryan Cantrill <firstname.lastname@example.org> Date: 2019-08-30T10:01:09.000Z 11585 ::scalehrtime could be more precise Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>