blob: 3fd739f6f535ed8d281529e5ac0d42289d6c8910 [file] [log] [blame]
Jakub Czapigae0c60f32020-10-09 10:07:47 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include "stubs/timestamp.h"
4
5static uint64_t timestamp_value = 0;
6static int timestamp_tick_freq_mhz_value = 1;
7
8/* Provides way to control timestamp value */
9void dummy_timestamp_set(uint64_t v)
10{
11 timestamp_value = v;
12}
13
14/* Provides way to control timestamp tick frequency MHz value */
15void dummy_timestamp_tick_freq_mhz_set(int v)
16{
17 timestamp_tick_freq_mhz_value = v;
18}
19
20/* Reimplementation of timestamp getter to control behaviour */
21uint64_t timestamp_get(void)
22{
23 return timestamp_value;
24}
25
26int timestamp_tick_freq_mhz(void)
27{
28 return timestamp_tick_freq_mhz_value;
29}