blob: e1c762c7a8d74ada7121aeaff64674c696e1d971 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef _watchdog_h_
#define _watchdog_h_
//============================================================
//
// watchdog.h - watchdog handling
//
// Copyright (c) 1996-2011, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
// SDLMAME by Olivier Galibert and R. Belmont
//
//============================================================
#include "sdlsync.h"
class watchdog
{
public:
watchdog(void);
~watchdog(void);
void reset() { osd_event_set(m_event); }
osd_event * event(void) { return m_event; }
INT32 do_exit(void) { return m_do_exit; }
osd_ticks_t getTimeout(void) { return m_timeout; }
void setTimeout(int timeout);
private:
osd_event * m_event;
osd_thread * m_thread;
volatile INT32 m_do_exit;
osd_ticks_t m_timeout;
};
#endif
|