3 ms·
I agree on that point. To extend, I said RDTSC but was actually thinking of QueryPerformanceCounter() (my bad). Going App->Platform becomes problematic when an
by jstimpfle 5y ago
I agree on that point. To extend, I said RDTSC but was actually thinking of QueryPerformanceCounter() (my bad). Going App->Platform becomes problematic when an abstracted facility cannot be implemented as a simple function call but requires a "protocol" that involves multiple function calls. QueryPerformanceCounter() is a simple case here, it only requires an initialization step using QueryPerformanceFrequency(), but it could already be seen as an absraction leak. Either that, or the abstraction has to be designed to include calls and data structures that are only used on certain implementations. This requires foresight when designing the abstraction and it makes the abstraction inconvenient to use.
- dundarious 5y agoYes, maybe something requires some setup in the top Platform layer, but QPC is also pretty light on that front. And you should only apply the frequency when displaying the value for humans anyway, which makes it quite easy to wrangle the values from QPC and CLOCK_MONOTONIC, etc., at the display site, IME.
- deleted 5y ago[deleted]