keithw/mosh — pull request #510 by mistydemeo (2014-04-18 07:05:44+00:00)
Title: Timestamp: remove Darwin-specific code

This branch removes the Darwin-specific timestamp code.

freeze_timestamp() was previously using the `mach_absolute_time()` function on Darwin to calculate timestamps. This isn't really necessary, since Darwin also supports `gettimeofday()`, the case immediately afterwards.

This also happens to fix #479. There was an endian bug in the timestamp calculation that caused implausible timestamps on PowerPC, which is easily fixed but doesn't happen with `gettimeofday()` anyway.

(I'm assuming here the mach code was just supposed to be for OS X/iOS.)