Provide default timestamp implementation using monotonic timer. */
| 294 | |
| 295 | /* Provide default timestamp implementation using monotonic timer. */ |
| 296 | uint64_t __weak timestamp_get(void) |
| 297 | { |
| 298 | struct mono_time t1, t2; |
| 299 | |
| 300 | if (!CONFIG(HAVE_MONOTONIC_TIMER)) |
| 301 | return 0; |
| 302 | |
| 303 | mono_time_set_usecs(&t1, 0); |
| 304 | timer_monotonic_get(&t2); |
| 305 | |
| 306 | return mono_time_diff_microseconds(&t1, &t2); |
| 307 | } |
| 308 | |
| 309 | /* Like timestamp_get() above this matches up with microsecond granularity. */ |
| 310 | int __weak timestamp_tick_freq_mhz(void) |
no test coverage detected