tdata->iterRes = tdata->iters;
tdata->iterRes = 0;
void ThreadExecFunction(void *data){    ThreadRunData *tdata = (ThreadRunData*)data;    unsigned char buf2[1024];    tdata->status = SECSuccess;    tdata->tstart = PR_Now();    if (*tdata->doIters) {        long i = tdata->iters;        tdata->iterRes = tdata->iters;        while (i--) {            SECStatus rv = tdata->fn((void*)tdata->rsaKey, buf2, (unsigned char*)tdata->buf);            if (rv != SECSuccess) {                tdata->errNum = PORT_GetError();                tdata->status = rv;                return;            }        }    } else {        PRIntervalTime total = PR_SecondsToInterval(tdata->seconds);        PRIntervalTime start = PR_IntervalNow();        tdata->iterRes = 0;        while (PR_IntervalNow() - start < total) {            SECStatus rv = tdata->fn((void*)tdata->rsaKey, buf2, (unsigned char*)tdata->buf);            if (rv != SECSuccess) {                tdata->errNum = PORT_GetError();                tdata->status = rv;                return;            }            tdata->iterRes++;        }    }    tdata->tstop = PR_Now();}