This patch adds a shim for missing time functions on z/OS, and adds a layer of indirection to account for differences in the timespec struct on different systems. This was originally committed as 173b51169b83 and reverted in 777ca48c9f08 because the original commit also checked-in unrelated changes. Differential Revision: https://reviews.llvm.org/D87940