]> git.saurik.com Git - wxWidgets.git/blame - src/qt/timer.cpp
more asserts
[wxWidgets.git] / src / qt / timer.cpp
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: timer.cpp
01b2eeec
KB
3// Purpose: wxTimer implementation
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
7c78e7c7
RR
12#ifdef __GNUG__
13#pragma implementation "timer.h"
14#endif
15
16#include "wx/timer.h"
17
01b2eeec
KB
18#if !USE_SHARED_LIBRARY
19IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
20#endif
7c78e7c7 21
01b2eeec 22wxTimer::wxTimer()
7c78e7c7 23{
01b2eeec
KB
24 m_milli = 0 ;
25 m_lastMilli = -1 ;
26 m_id = 0;
27 m_oneShot = FALSE;
28}
7c78e7c7 29
01b2eeec 30wxTimer::~wxTimer()
7c78e7c7 31{
01b2eeec
KB
32 Stop();
33}
7c78e7c7 34
01b2eeec 35bool wxTimer::Start(int milliseconds,bool mode)
7c78e7c7 36{
01b2eeec
KB
37 m_oneShot = mode ;
38 if (m_milliseconds < 0)
39 m_milliseconds = lastMilli;
7c78e7c7 40
01b2eeec
KB
41 if (m_milliseconds <= 0)
42 return FALSE;
7c78e7c7 43
01b2eeec 44 m_lastMilli = m_milli = m_milliseconds;
7c78e7c7 45
01b2eeec
KB
46 // TODO: set the timer going.
47 return FALSE;
48}
7c78e7c7 49
01b2eeec 50void wxTimer::Stop()
7c78e7c7 51{
01b2eeec
KB
52 m_id = 0 ;
53 m_milli = 0 ;
54}
7c78e7c7 55
7c78e7c7 56