Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
monotonic_clock.h
Go to the documentation of this file.
1// Copyright 2026 The Symbian SDK Authors.
2// Licensed under the Apache License, Version 2.0.
3
4#ifndef SYMBIAN_API_TIME_MONOTONIC_CLOCK_H_
5#define SYMBIAN_API_TIME_MONOTONIC_CLOCK_H_
6
7#include <chrono>
8#include <cstdint>
9
10namespace symbian::api::time {
11
12// The SDK runtime extends the native wrapping tick source for steady_clock.
13class MonotonicClock final {
14 public:
15 static std::int64_t NowNanoseconds() {
16 return std::chrono::duration_cast<std::chrono::nanoseconds>(
17 std::chrono::steady_clock::now().time_since_epoch())
18 .count();
19 }
20};
21
22} // namespace symbian::api::time
23
24#endif // SYMBIAN_API_TIME_MONOTONIC_CLOCK_H_
Definition monotonic_clock.h:13
static std::int64_t NowNanoseconds()
Definition monotonic_clock.h:15
Definition frame_pacer.h:13