libpayload: Add gettimeofday() and friends

Add a gettimeofday() implementation - it works pretty well, but it
drifts a little bit so its not very suitable for keeping time.  It
works best to track changes in time over small periods of time.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3272 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Jordan Crouse
2008-04-25 23:11:02 +00:00
parent d772e1e7fe
commit e2271430c5
7 changed files with 200 additions and 4 deletions

View File

@ -30,9 +30,9 @@
#ifndef _ARCH_RDTSC_H
#define _ARCH_RDTSC_H
static inline unsigned long long rdtsc(void)
static u64 rdtsc(void)
{
unsigned long long val;
u64 val;
__asm__ __volatile__ ("rdtsc" : "=A" (val));
return val;
}