getting rid of Time.h

Summary: As titled, getting rid of Time.h and use std::chrono to compute the current time.

Differential Revision: D21005713

fbshipit-source-id: 7e9d31af4b8652199bbe36b6ef76968cadcb4f2c
This commit is contained in:
Srikrishna Gopu 2020-04-14 09:50:53 -07:00 committed by Facebook GitHub Bot
parent 147de1f274
commit 27d32bff2f

View File

@ -1,25 +0,0 @@
// Copyright (c) 2007-present, Facebook, Inc.
//
// High resolution timers for wall clock and CPU time.
#ifndef COMMON_TIME_TIME_H
#define COMMON_TIME_TIME_H
#include <ctime>
#include <chrono>
using namespace std::chrono;
namespace facebook {
class WallClockUtil {
public:
// ---------------- time in seconds ---------------
static time_t NowInSecFast() {
return std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
}
};
} // !namespace facebook
#endif // !COMMON_TIME_TIME_H