home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Frameworks / SCAPI 0.85 / Spunk Cross API 1.0 / MacSCAPI / Headers / SCAPITimer.h < prev    next >
Encoding:
Text File  |  1997-06-06  |  1.3 KB  |  66 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    SCAPITimer.h                ©1997 Spunk Cross         All rights reserved.
  3. // ===========================================================================
  4.  
  5. #ifndef SCAPITIMER_H
  6. #define SCAPITIMER_H
  7.  
  8. #include "SCAPICommonIncludes.h"
  9.  
  10.  
  11. // ---------------------------------------------------------------------------
  12. //        • SCAPITimer Class
  13. // ---------------------------------------------------------------------------
  14.  
  15. class SCAPITimer : public LPeriodical
  16. {
  17.  
  18.     // ===========================================================
  19.     // === Spunk Cross API, these are the routines you can use ===
  20.     // ===========================================================
  21.     
  22.         // • Constructor - Destructor
  23.         // --------------------------
  24.         
  25.     public:
  26.     
  27.         SCAPITimer(float    inInterval);
  28.         
  29.         ~SCAPITimer();
  30.         
  31.         
  32.         // • Member functions
  33.         // ------------------
  34.         
  35.     public:
  36.     
  37.         void    SetInterval(float    inInterval);
  38.         
  39.         
  40.     protected:
  41.     
  42.         virtual void    Tick();
  43.         
  44.         
  45.     // =================================
  46.     // === Internal part, do not use ===
  47.     // =================================
  48.     
  49.         // • Member variables
  50.         // ------------------
  51.         
  52.     private:
  53.     
  54.         float        mInterval;
  55.         long        mReferenceTickCount;
  56.         
  57.         
  58.         // • Member functions
  59.         // ------------------
  60.         
  61.     private:
  62.     
  63.         virtual    void    SpendTime(const EventRecord        &inMacEvent);
  64. };
  65.  
  66. #endif