mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
265128f4f4
Summary: To simplify the build and fall in line with Folly's conventions, remove several conditional includes. Instead, headers conditionally define symbols. Reviewed By: xavierd Differential Revision: D37897850 fbshipit-source-id: 8b52d5310f5cd8cb17fdc013117c271ae09dd5d6
27 lines
568 B
C++
27 lines
568 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#include "eden/fs/utils/Clock.h"
|
|
|
|
#include <folly/portability/Time.h>
|
|
|
|
#include <chrono>
|
|
#include <system_error>
|
|
|
|
namespace facebook::eden {
|
|
|
|
timespec UnixClock::getRealtime() const {
|
|
timespec rv;
|
|
if (clock_gettime(CLOCK_REALTIME, &rv)) {
|
|
throw std::system_error(
|
|
errno, std::generic_category(), "clock_gettime failed");
|
|
}
|
|
return rv;
|
|
}
|
|
|
|
} // namespace facebook::eden
|