Summary: I think I'm good with this being merged as long as all four cases
(clock_gettime(), gettimeofday(), Windows and Mac OS) got tested.
aa971c59246332391116caafd18855bccf2f99a5:
Just moving code here. Looks good to me.
e42e054fbfb5dd8d4a5729f9f7988b2def60840e:
Good, this doesn't make any particular assumptions about the origin of
monotonic time. On current Linux, CLOCK_MONOTONIC is actually since system
boot. The parts for platforms I know look okay to me, but did we manage
to actually test the Windows / Mac OS X stuff?
(cf. e431ed37360a405f36e07a8c902146f0b4f4b31b)
a2e5704a912ba06255c56de5603fce6444ebad98:
Looks fine.
4baf1d04db6c8e84a113cc801284be3dbe23884e:
Looks okay.
e431ed37360a405f36e07a8c902146f0b4f4b31b:
Hmm, looks okay but have we tested it on Windows yet?
Your main questions were about testing. I ran the tests on Linux, OSX, and on Linux with clock_gettime artificially disabled. They all seemed to work okay. I compiled the windows tests, but didn't have an easy way to run them. I think I'll just merge, though, and see what Jenkins thinks? Unless you object.