Skip to content

Commit

Permalink
Fix OSS linux build
Browse files Browse the repository at this point in the history
Summary: std::chrono::years is a C++20 feature, so use hours instead since it's been available since C++11

Reviewed By: HarveyHunt

Differential Revision: D51911350

fbshipit-source-id: 757ead214020bd976844f5a150cab33b4a1cc829
  • Loading branch information
Orvid authored and facebook-github-bot committed Dec 7, 2023
1 parent 02849dd commit 77bd2cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/logging/test/RateLimiterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ TEST(RateLimiter, concurrentThreads) {
}

TEST(RateLimiter, LargeInterval) {
IntervalRateLimiter limiter{1, std::chrono::years{1}};
IntervalRateLimiter limiter{1, std::chrono::hours{8765}}; // Just under a year
EXPECT_TRUE(limiter.check());
}

0 comments on commit 77bd2cf

Please sign in to comment.