Cygwin: clocks: use either tickcount or tick period

Use whatever native unit the system provides for the resolution of
a timer to avoid rounding problems

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-11-29 12:56:18 +01:00
parent 09870c6e95
commit 43e8fddfa6
2 changed files with 26 additions and 15 deletions

View File

@ -53,7 +53,11 @@ class clk_t
{
protected:
LONG inited;
/* Some values are returned as ticks/s, some as 100ns period of a
single tick. Store the original value and use a computation method
making the most sense for the value given, to avoid rounding issues. */
LONGLONG ticks_per_sec;
LONGLONG period;
virtual void init ();
virtual int now (clockid_t, struct timespec *) = 0;