fixed 32bit v.s. 64bit long int arithematics

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1434 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Li-Ta Lo
2004-03-18 19:40:07 +00:00
parent 698f23db22
commit 26b237ee18
6 changed files with 14 additions and 43 deletions

View File

@ -17,17 +17,14 @@ void myusec_calibrate_delay()
unsigned long timeusec;
struct timeval start, end;
int ok = 0;
void myusec_delay(int time);
printf("Setting up microsecond timing loop\n");
while (!ok) {
//fprintf(stderr, "Try %d\n", count);
gettimeofday(&start, 0);
myusec_delay(count);
gettimeofday(&end, 0);
timeusec = 1000000 * (end.tv_sec - start.tv_sec ) +
(end.tv_usec - start.tv_usec);
//fprintf(stderr, "timeusec is %d\n", timeusec);
count *= 2;
if (timeusec < 1000000/4)
continue;