OSX time shim

@fire I pulled your code in and cleaned it up a bit. What do you think?