[PATCH 096/144] Avoid loss precision in event time calculations
The current code implicitly converts `epoch` to a float before calculating `time_end` and `time_start` and converting back to a `cl_ulong`. A `float` only has seven or so digits of accuracy meaning this conversion throws away the least significant digits of `epoch` if `epoch` is larger than about 1e8. Conversely, the precision of `diff` is around 1e-3 so multiplying by 1e6 makes all of these digits > 1 and converting this number to a `cl_ulong` will not lose any digits. The gist below illustrates this in Python.
https://gist.github.com/nchristensen/
15ab1fd53ba099accaab780ab6dbad90
Gbp-Pq: Name 0096-Avoid-loss-precision-in-event-time-calculations.patch