sapling/eden/fs/utils/Clock.h
generatedunixname89002005287564 efeb8cd887 eden (5003156845066480047)
Reviewed By: genevievehelsel

Differential Revision: D53914310

fbshipit-source-id: f56669c44d28f7e327b7918ed52647dcd2b0cfbf
2024-02-23 11:30:48 -08:00

37 lines
609 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.
*/
#pragma once
#include <ctime>
namespace facebook::eden {
/**
* Represents access to the system clock(s).
*/
class Clock {
public:
virtual ~Clock() = default;
/**
* Returns the real time elapsed since the Epoch.
*/
virtual timespec getRealtime() const = 0;
};
/**
*
*/
class UnixClock : public Clock {
public:
/// CLOCK_REALTIME
timespec getRealtime() const override;
};
} // namespace facebook::eden