FB_LOG_EVERY_MS should use wall time instead of cpu time
authorNathan Bronson <ngbronson@fb.com>
Tue, 4 Feb 2014 20:26:36 +0000 (12:26 -0800)
committerSara Golemon <sgolemon@fb.com>
Thu, 6 Feb 2014 19:50:14 +0000 (11:50 -0800)
commit6d89f3d33268eaa12d5eb03a4afa5caa856306c5
tree4ea0f8e2723e0616bb52804adea5d3badf020650
parent166dfd2b189c53773e1355e7328b95234bda2368
FB_LOG_EVERY_MS should use wall time instead of cpu time

Summary:
FB_LOG_EVERY_MS was using clock() as its source of time, which
measures the elapsed CPU time of the process.  The name and the docs
suggest that wall time was intended, so that's what this diff does.

Test Plan: new unit test

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1157926
folly/Logging.h
folly/test/LoggingTest.cpp [new file with mode: 0644]