CLEANUP: Add timing output to proof output.
This commit is contained in:
parent
6b3d572e3b
commit
2557d308bb
15
src/timer.c
15
src/timer.c
@ -18,6 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
#include "system.h"
|
||||||
|
#include "switches.h"
|
||||||
|
#include "symbol.h"
|
||||||
|
#include "arachne.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Timer functions
|
* Timer functions
|
||||||
@ -27,6 +31,7 @@
|
|||||||
|
|
||||||
#ifdef linux
|
#ifdef linux
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
static clock_t endwait = 0;
|
static clock_t endwait = 0;
|
||||||
@ -80,8 +85,14 @@ passed_time_limit ()
|
|||||||
times (&t);
|
times (&t);
|
||||||
if ((t.tms_utime + t.tms_stime) > endwait)
|
if ((t.tms_utime + t.tms_stime) > endwait)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else if (switches.output == PROOF)
|
||||||
return 0;
|
{
|
||||||
|
indentPrint ();
|
||||||
|
eprintf ("Clockticks per second: %jd\tTicks passed: %jd\n",
|
||||||
|
(intmax_t) (sysconf (_SC_CLK_TCK)),
|
||||||
|
(intmax_t) (t.tms_utime + t.tms_stime));
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user