diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-27 15:09:23 -0700 |
commit | 19c25fd6aab057b2373717f996fe538507c1b1e1 (patch) | |
tree | 7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src/aig/gia/giaSwitch.c | |
parent | 94356f0d1fa8e671303299717f631ecf0ca2f17e (diff) | |
download | abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.gz abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.bz2 abc-19c25fd6aab057b2373717f996fe538507c1b1e1.zip |
Adding a wrapper around clock() for more accurate time counting in ABC.
Diffstat (limited to 'src/aig/gia/giaSwitch.c')
-rw-r--r-- | src/aig/gia/giaSwitch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/aig/gia/giaSwitch.c b/src/aig/gia/giaSwitch.c index 8bf027a4..d5307461 100644 --- a/src/aig/gia/giaSwitch.c +++ b/src/aig/gia/giaSwitch.c @@ -560,11 +560,11 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) Vec_Int_t * vSwitching; float * pSwitching; int i; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); if ( pPars->fProbOne && pPars->fProbTrans ) printf( "Conflict of options: Can either compute probability of 1, or probability of switching by observing transitions.\n" ); // create manager - clk = clock(); + clk = Abc_Clock(); p = Gia_ManSwiCreate( pAig, pPars ); if ( pPars->fVerbose ) { @@ -574,7 +574,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) 12.0*Gia_ManObjNum(p->pAig)/(1<<20), 4.0*p->nWords*p->pAig->nFront/(1<<20), 4.0*p->nWords*(Gia_ManCiNum(p->pAig) + Gia_ManCoNum(p->pAig))/(1<<20) ); - ABC_PRT( "Time", clock() - clk ); + ABC_PRT( "Time", Abc_Clock() - clk ); } // perform simulation Gia_ManRandom( 1 ); @@ -592,7 +592,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars ) if ( pPars->fVerbose ) { printf( "Simulated %d frames with %d words. ", pPars->nIters, pPars->nWords ); - ABC_PRT( "Simulation time", clock() - clkTotal ); + ABC_PRT( "Simulation time", Abc_Clock() - clkTotal ); } // derive the result vSwitching = Vec_IntStart( Gia_ManObjNum(pAig) ); |