* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#include "qemu/osdep.h"
#include "qemu/timer.h"
/***********************************************************/
/* real time host monotonic timer */
+int64_t clock_start;
+
#ifdef _WIN32
int64_t clock_freq;
exit(1);
}
clock_freq = freq.QuadPart;
+ clock_start = get_clock();
}
#else
static void __attribute__((constructor)) init_get_clock(void)
{
+ struct timespec ts;
+
use_rt_clock = 0;
-#ifdef CLOCK_MONOTONIC
- {
- struct timespec ts;
- if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
- use_rt_clock = 1;
- }
+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
+ use_rt_clock = 1;
}
-#endif
+ clock_start = get_clock();
}
#endif