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/proof/abs/absIter.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/proof/abs/absIter.c')
-rw-r--r-- | src/proof/abs/absIter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/proof/abs/absIter.c b/src/proof/abs/absIter.c index e8e5730b..7b660359 100644 --- a/src/proof/abs/absIter.c +++ b/src/proof/abs/absIter.c @@ -70,7 +70,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU int i, iFrame0, iFrame; int nTotal = 0, nRemoved = 0; Vec_Int_t * vGScopy; - clock_t clk, clkTotal = clock(); + abctime clk, clkTotal = Abc_Clock(); assert( Gia_ManPoNum(p) == 1 ); assert( p->vGateClasses != NULL ); vGScopy = Vec_IntDup( p->vGateClasses ); @@ -99,7 +99,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU if ( Gia_ObjIsInGla(p, Gia_ObjFanin0(Gia_ObjRoToRi(p, pObj))) ) continue; } - clk = clock(); + clk = Abc_Clock(); printf( "%5d : ", nTotal ); printf( "Obj =%7d ", i ); Gia_ObjRemFromGla( p, pObj ); @@ -122,7 +122,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU printf( "Removing " ); Vec_IntWriteEntry( vGScopy, Gia_ObjId(p, pObj), 0 ); } - Abc_PrintTime( 1, "Time", clock() - clk ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); nTotal++; // update the classes Vec_IntFreeP( &p->vGateClasses ); @@ -135,7 +135,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU Vec_IntFree( vGScopy ); printf( "Tried = %d. ", nTotal ); printf( "Removed = %d. (%.2f %%) ", nRemoved, 100.0 * nRemoved / Vec_IntCountPositive(p->vGateClasses) ); - Abc_PrintTime( 1, "Time", clock() - clkTotal ); + Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal ); return NULL; } |