blob: 4cedc3d3a2780aa538d136ff4ddc0b8e267b2e68 [file] [log] [blame]
Kangheui Won9f7df5c12020-10-04 21:12:06 +11001/* SPDX-License-Identifier: GPL-2.0-or-later */
2
Kangheui Won9f7df5c12020-10-04 21:12:06 +11003#include <cpu/x86/tsc.h>
4#include <timer.h>
5#include <timestamp.h>
6
7void timer_monotonic_get(struct mono_time *mt)
8{
9 mono_time_set_usecs(mt, timestamp_get());
10}
11
12uint64_t timestamp_get(void)
13{
14 return rdtscll() / tsc_freq_mhz();
15}