mirror of
https://github.com/facebook/sapling.git
synced 2024-09-11 18:47:10 +03:00
stub out fboss fbcode dependencies
Summary: Add some stubs to replace fbcode dependencies that were breaking OSS build, plus list some necessary .cpp and libs that were missing in the CMake config Includes small change to QsfpUtilTx.cpp to fix a -Wsequence-error that cmake flags promoted to error Reviewed By: shri-khare Differential Revision: D33708895 fbshipit-source-id: a4f4d557f4155d88d4c59767cd74bec95f63f312
This commit is contained in:
parent
a6d8f136d8
commit
b7bd10a392
@ -35,7 +35,7 @@ class FacebookBase2 : virtual public cpp2::FacebookServiceSvIf {
|
||||
time_t startTime;
|
||||
|
||||
public:
|
||||
explicit FacebookBase2(const char*) {
|
||||
explicit FacebookBase2(std::string name) {
|
||||
startTime = time(nullptr);
|
||||
}
|
||||
|
||||
@ -75,5 +75,12 @@ class FacebookBase2 : virtual public cpp2::FacebookServiceSvIf {
|
||||
}
|
||||
};
|
||||
|
||||
/// Stub
|
||||
class FacebookBase2DeprecationMigration : public FacebookBase2 {
|
||||
protected:
|
||||
explicit FacebookBase2DeprecationMigration(std::string name)
|
||||
: FacebookBase2(std::move(name)) {}
|
||||
};
|
||||
|
||||
} // namespace fb303
|
||||
} // namespace facebook
|
||||
|
28
common/time/Time.h
Normal file
28
common/time/Time.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2004-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <time.h>
|
||||
|
||||
namespace facebook {
|
||||
|
||||
// Stub. Should probably change calling code to use folly chrono apis instead
|
||||
class WallClockUtil {
|
||||
public:
|
||||
// ---------------- time in seconds ---------------
|
||||
static time_t NowInSecSlow() {
|
||||
return ::time(nullptr);
|
||||
}
|
||||
static time_t NowInSecFast() {
|
||||
return ::time(nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace facebook
|
Loading…
Reference in New Issue
Block a user