mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Reorganizing source code. Created util dir
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
630ba0c675
commit
2c464d413d
153 changed files with 0 additions and 0 deletions
39
src/util/timer.h
Normal file
39
src/util/timer.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
timer.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2009-01-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _TIMER_H_
|
||||
#define _TIMER_H_
|
||||
|
||||
class stopwatch;
|
||||
|
||||
/**
|
||||
\brief Wrapper for the stopwatch class. It hides windows.h dependency.
|
||||
*/
|
||||
class timer {
|
||||
stopwatch * m_watch;
|
||||
public:
|
||||
timer();
|
||||
~timer();
|
||||
void start();
|
||||
double get_seconds();
|
||||
bool timeout(unsigned secs) { return secs > 0 && get_seconds() > secs; }
|
||||
bool ms_timeout(unsigned ms) { return ms > 0 && get_seconds() * 1000 > ms; }
|
||||
};
|
||||
|
||||
#endif /* _TIMER_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue