mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 19:02:02 +00:00
Merge branch 'unstable' of https://git01.codeplex.com/z3 into unstable
This commit is contained in:
commit
c7e27fb2d9
1 changed files with 11 additions and 10 deletions
|
@ -146,7 +146,7 @@ public:
|
||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
if (!m_running) {
|
if (!m_running) {
|
||||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &m_start);
|
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &m_start);
|
||||||
m_running = true;
|
m_running = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,8 +154,9 @@ public:
|
||||||
void stop() {
|
void stop() {
|
||||||
if (m_running) {
|
if (m_running) {
|
||||||
struct timespec _stop;
|
struct timespec _stop;
|
||||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &_stop);
|
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &_stop);
|
||||||
m_time += (_stop.tv_sec - m_start.tv_sec) * 1000000000ull;
|
m_time += (_stop.tv_sec - m_start.tv_sec) * 1000000000ull;
|
||||||
|
if (m_time != 0 || _stop.tv_nsec >= m_start.tv_nsec)
|
||||||
m_time += (_stop.tv_nsec - m_start.tv_nsec);
|
m_time += (_stop.tv_nsec - m_start.tv_nsec);
|
||||||
m_running = false;
|
m_running = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue