The timestamp in the guid starts off with real time, but "runs ahead" if a lot
of guids are generated. If not many guids are being generated, the timestamp
is fast-forwarded to the current ioloop_timeval. The buggy comparison prevented
fast forwarding when tv_sec matched, but tv_nsec value was > 0 (which
was true most of the time).
guid_128_host_hash_get(my_hostdomain(), guid_static+4);
} else if (ioloop_timeval.tv_sec > ts.tv_sec ||
(ioloop_timeval.tv_sec == ts.tv_sec &&
- ioloop_timeval.tv_usec > ts.tv_nsec*1000)) {
+ ioloop_timeval.tv_usec * 1000 > ts.tv_nsec)) {
/* use ioloop's time since we have it. it doesn't provide any
more uniqueness, but it allows finding out more reliably
when a GUID was created. */