Improve folly/portability/Time.cpp OS X and Windows compatibility
authorChristopher Dykes <cdykes@fb.com>
Tue, 12 Jul 2016 18:34:23 +0000 (11:34 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Tue, 12 Jul 2016 18:38:28 +0000 (11:38 -0700)
commita4657e890b21119f661e5418c51e23449bbe2001
tree03c8fe97dde326e2128053294d50ea2f79535e0c
parentb179601dfc42d8e3230d6477d7db8f3d5a8f64dc
Improve folly/portability/Time.cpp OS X and Windows compatibility

Summary:
Folly currently contains wrappers to emulate
`clock_gettime()` on platforms which don't support it.

The OS X and Windows wrappers are missing a bit of functionality we
need. In this diff, I:

1. Bring the OS X and Windows wrappers closer to Linux's functionality
2. Add unit tests

Reviewed By: bmaurer, mzlee

Differential Revision: D3418054

fbshipit-source-id: 47eba871e844b4c3dccd7ab201ec82e1f6edf729
folly/portability/Time.cpp
folly/portability/Time.h
folly/portability/test/TimeTest.cpp [new file with mode: 0644]
folly/test/Makefile.am
folly/test/TestUtils.h