예제 #1
0
ulong timer_get_boot_us(void)
{
	static uint64_t base_count;
	uint64_t count = os_get_nsec();

	if (!base_count)
		base_count = count;

	return (count - base_count) / 1000;
}
예제 #2
0
파일: sandbox.c 프로젝트: bbbLinux/u_boot
ulong get_timer(ulong base)
{
	return (os_get_nsec() / 1000000) - base;
}
static int sandbox_timer_get_count(struct udevice *dev, u64 *count)
{
	*count = os_get_nsec() / 1000 + sandbox_timer_offset * 1000;

	return 0;
}
예제 #4
0
파일: cpu.c 프로젝트: CZ-NIC/u-boot-turris
unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
{
	return os_get_nsec() / 1000;
}