summaryrefslogtreecommitdiffstats
path: root/src/aig/llb/llb3Nonlin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/llb/llb3Nonlin.c')
-rw-r--r--src/aig/llb/llb3Nonlin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/aig/llb/llb3Nonlin.c b/src/aig/llb/llb3Nonlin.c
index f41e0f6e..e20a1541 100644
--- a/src/aig/llb/llb3Nonlin.c
+++ b/src/aig/llb/llb3Nonlin.c
@@ -433,10 +433,8 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
assert( Aig_ManRegNum(p->pAig) > 0 );
// compute time to stop
- if ( p->pPars->TimeLimit )
- p->pPars->TimeTarget = clock() + p->pPars->TimeLimit * CLOCKS_PER_SEC;
- else
- p->pPars->TimeTarget = 0;
+ p->pPars->TimeTarget = p->pPars->TimeLimit ? time(NULL) + p->pPars->TimeLimit : 0;
+
// set the stop time parameter
p->dd->TimeStop = p->pPars->TimeTarget;
p->ddG->TimeStop = p->pPars->TimeTarget;
@@ -474,7 +472,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
{
// check the runtime limit
clk2 = clock();
- if ( p->pPars->TimeLimit && clock() >= p->pPars->TimeTarget )
+ if ( p->pPars->TimeLimit && time(NULL) > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout (%d seconds) during image computation.\n", p->pPars->TimeLimit );