1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #include "stubs/timestamp.h" 4 5 static uint64_t timestamp_value = 0; 6 static int timestamp_tick_freq_mhz_value = 1; 7 8 /* Provides way to control timestamp value */ dummy_timestamp_set(uint64_t v)9void dummy_timestamp_set(uint64_t v) 10 { 11 timestamp_value = v; 12 } 13 14 /* Provides way to control timestamp tick frequency MHz value */ dummy_timestamp_tick_freq_mhz_set(int v)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 */ timestamp_get(void)21uint64_t timestamp_get(void) 22 { 23 return timestamp_value; 24 } 25 timestamp_tick_freq_mhz(void)26int timestamp_tick_freq_mhz(void) 27 { 28 return timestamp_tick_freq_mhz_value; 29 } 30