mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I9850950db8bd84f0904ea1a413151887f52098cf
24 lines
585 B
C++
24 lines
585 B
C++
#ifndef PLATFORM_API_SYSTEM_CLOCK_H_
|
|
#define PLATFORM_API_SYSTEM_CLOCK_H_
|
|
|
|
#include "platform/base/exception.h"
|
|
#include "absl/time/clock.h"
|
|
|
|
namespace location {
|
|
namespace nearby {
|
|
|
|
class SystemClock final {
|
|
public:
|
|
// Initialize global system state.
|
|
static void Init();
|
|
// Returns current absolute time. It is guaranteed to be monotonic.
|
|
static absl::Time ElapsedRealtime();
|
|
// Pauses current thread for the specified duration.
|
|
static Exception Sleep(absl::Duration duration);
|
|
};
|
|
|
|
} // namespace nearby
|
|
} // namespace location
|
|
|
|
#endif // PLATFORM_API_SYSTEM_CLOCK_H_
|