diff options
Diffstat (limited to 'src/aig/gia/giaSim.c')
-rw-r--r-- | src/aig/gia/giaSim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aig/gia/giaSim.c b/src/aig/gia/giaSim.c index 44b917c7..4be740cd 100644 --- a/src/aig/gia/giaSim.c +++ b/src/aig/gia/giaSim.c @@ -611,6 +611,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) Gia_ManSim_t * p; int i, clkTotal = clock(); int iOut, iPat, RetValue = 0; + int nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit + time(NULL) : 0; if ( pAig->pReprs && pAig->pNexts ) return Gia_ManSimSimulateEquiv( pAig, pPars ); ABC_FREE( pAig->pCexSeq ); @@ -647,7 +648,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ) RetValue = 1; break; } - if ( (clock() - clkTotal)/CLOCKS_PER_SEC >= pPars->TimeLimit ) + if ( time(NULL) > pPars->TimeLimit ) { i++; break; |