3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00
z3/lib/instruction_count.h
Leonardo de Moura e9eab22e5c Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:35:25 -07:00

44 lines
664 B
C++

/*++
Copyright (c) 2009 Microsoft Corporation
Module Name:
instruction_count.h
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner) 2009-03-04.
Revision History:
--*/
#ifndef _INSTRUCTION_COUNT_H_
#define _INSTRUCTION_COUNT_H_
/**
\brief Wrapper for an instruction counter.
*/
class instruction_count {
unsigned long long m_count;
public:
instruction_count() : m_count(0) {}
~instruction_count() {}
void start();
double get_num_instructions();
bool is_instruction_maxed(double max_instr) {
return max_instr > 0.0 && get_num_instructions() > max_instr;
}
};
#endif /* _INSTRUcTION_COUNT_H_ */