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,7 +30,7 @@
#include <libpayload.h>
#include <arch/rdtsc.h>
static unsigned int cpu_khz;
unsigned int cpu_khz;
/**
* Calculate the speed of the processor for use in delays.