
Peter Simons
Did you consider using floating-point Timeout type, with its values representing seconds, possibly fractional? This could have some negative performance impact, but would be elegant IMHO.
It certainly is more elegant, but I personally would rather not have these calculations from Double to Int in the low-level routines.
I would hope that they are not that expensive. Remembering which API uses ms, us or ns, worrying about overflows, and having problems when a potential resolution of something increases after a few years but the API is stuck with a lower resolution - this disappears when we just use floating-point seconds. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/