Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
counters.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_SYSTEM_COUNTERS_H_
5#define SYMBIAN_API_SYSTEM_COUNTERS_H_
6
7#include <cstdint>
8
9#include "absl/status/statusor.h"
10#include "absl/time/time.h"
11
12namespace symbian::api::system {
13
22 std::uint32_t count = 0;
24 absl::Duration period = absl::ZeroDuration();
25};
26
30 std::uint32_t count = 0;
32 std::uint32_t ticks_per_second = 0;
33};
34
36absl::StatusOr<TickReading> ReadTickCounter();
37
43absl::StatusOr<FastCounterReading> ReadFastCounter();
44
45} // namespace symbian::api::system
46
47#endif // SYMBIAN_API_SYSTEM_COUNTERS_H_
Definition active_service.h:12
absl::StatusOr< FastCounterReading > ReadFastCounter()
Read the fast counter and its frequency, or a typed OS error.
Definition counters.cc:25
absl::StatusOr< TickReading > ReadTickCounter()
Read the native system tick and its period, or a typed OS error.
Definition counters.cc:11
Native 32-bit fast counter and platform-reported frequency.
Definition counters.h:28
std::uint32_t count
Counter value sampled after the frequency lookup.
Definition counters.h:30
std::uint32_t ticks_per_second
Native ticks per second; do not assume a fixed device value.
Definition counters.h:32
Native 32-bit elapsed-time tick and its measured period.
Definition counters.h:20
absl::Duration period
Duration of one tick reported by the current platform.
Definition counters.h:24
std::uint32_t count
Native tick count sampled after the period lookup.
Definition counters.h:22