if (!fd) { printf("bad filename?  %s\n", filename.get()); continue; }
readFile(int cycles){    printf("readFile\n");    PRFileDesc* fd;    PRInt32 fStatus;        // begin timing "lookups"    PRIntervalTime time = PR_IntervalNow();    while (cycles--) {        for (int x=1; x<=ENTRYCOUNT; x++) {            nsCAutoString filename; filename.Assign(TMPDIR "foo" DIRSEP);            filename.AppendInt( x % 32 );            filename.Append(DIRSEP);            filename.AppendInt( x );                        fd = PR_OpenFile(filename.get(), PR_RDONLY, 0);                        PRInt32 size = PR_Available(fd);                        char* fdBuffer = (char*) malloc (size);                        PRIntervalTime i1, i2, i3;            i1 = PR_IntervalNow();            fStatus = PR_Read(fd, fdBuffer, size);              i2 = PR_IntervalNow();                        if (fStatus == -1) {                printf("Bad fStatus %d\n", PR_GetError());                exit(1);            }             i3 = PR_IntervalNow();                        PR_Close(fd);            free(fdBuffer);/*            printf(" - reading %s [topen=%d tread=%d]\n",                 (const char *) filename,                PR_IntervalToMilliseconds(i2 - i1),                 PR_IntervalToMilliseconds(i3 - i2));*/        }    }    return PR_IntervalToMilliseconds(PR_IntervalNow() - time);}