]> git.saurik.com Git - wxWidgets.git/blame - src/qt/timer.cpp
fixes for S_IFMT for OS/2 from WX_2_2_BRANCH
[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 18IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
7c78e7c7 19
01b2eeec 20wxTimer::wxTimer()
7c78e7c7 21{
01b2eeec
KB
22 m_milli = 0 ;
23 m_lastMilli = -1 ;
24 m_id = 0;
25 m_oneShot = FALSE;
26}
7c78e7c7 27
01b2eeec 28wxTimer::~wxTimer()
7c78e7c7 29{
01b2eeec
KB
30 Stop();
31}
7c78e7c7 32
01b2eeec 33bool wxTimer::Start(int milliseconds,bool mode)
7c78e7c7 34{
01b2eeec
KB
35 m_oneShot = mode ;
36 if (m_milliseconds < 0)
37 m_milliseconds = lastMilli;
7c78e7c7 38
01b2eeec
KB
39 if (m_milliseconds <= 0)
40 return FALSE;
7c78e7c7 41
01b2eeec 42 m_lastMilli = m_milli = m_milliseconds;
7c78e7c7 43
01b2eeec
KB
44 // TODO: set the timer going.
45 return FALSE;
46}
7c78e7c7 47
01b2eeec 48void wxTimer::Stop()
7c78e7c7 49{
01b2eeec
KB
50 m_id = 0 ;
51 m_milli = 0 ;
52}
7c78e7c7 53
7c78e7c7 54