コード例 #1
0
ファイル: cpu.c プロジェクト: danielschwierzeck/u-boot
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;
}
コード例 #3
0
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;
}