Current area: HOME ->

Zip File view

C++ sources for serial communication


This page allows you to view the contents of a file contained inside a ZIP archive available at Programmer's Heaven. This means you can view the code and find what you need from it without having to download the ZIP file first. If the file contains source code for a language we recognize, we have syntax highlighted it.

Filename displayed: TIMER.H
Found in file: CPPCOM.ZIP

Download: XML-RPC for C and C++ XML-RPC is a quick-and-easy way to make procedure calls over  the Internet. It converts the procedure call into XML document,  sends it to a remote server using HTTP, and gets back the  response a...
#ifndef TIMER_H
#define TIMER_H

// Copyright ***********************************************************
//
//      The information in this file is copyright 1991 by David Orme.
//
//            Anyone may use this information for any purpose as long as he takes
//            responsability for any and all libility incurred from its use
//            or misuse and acknowledges its use in the user documentation.  This
//            information is provided AS IS with no warrenty of any kind, either
//            expressed or implied.
//
// End *****************************************************************


// Contents **********************************************************
//
//            Timer class definition
//
// Description
//
//            The timer class implements a simple DOS timer ISR and allows
//            timing tasks to be accomplished while other processing
//            occurs.  Note that all instances of this class reference the
//            _same_ timer ISR in memory.
//
// End ***************************************************************


// Interface dependencies ---------------------------------------------

// -- NONE --


// Implementation dependencies ----------------------------------------

// -- NONE --



// Global variables ---------------------------------------------------

const int TIMER = 0x1c;  // DOS timer int vector


class Timer {
private:
        static volatile unsigned long ticker;
        static void interrupt (far *oldtimer)(...);
        static void interrupt far NewTimer(...);

public:
        Timer();
        ~Timer();
        void Set(float seconds=0)       { ticker=seconds*182/10+1; }
        int TimeOut()               { return !ticker; }
};

// Description ---------------------------------------------------------
//
//            Defines the Timer class;  The constructor sets up NewTimer
//            as an ISR on the DOS timer interrupt and sets the ticker
//            to 0.  The timer may be set to time any task in the background
//            while other processing occurs and requires a minimal amount
//            of CPU time.
//
// SetTimer(unsigned seconds=0)
//
//            Set the timer to return to 0 in as many secs as you like.
//
// int TimeOut()
//
//            Returns true (!0) when the time set by SetTimer has elapsed.
//
// End -----------------------------------------------------------------




#endif


Standard Music description language #2

HotHTML 3 Professional 1.5.3000b
HotHTML 3 is a windows HTML/Text editor for developers that write in multiple languages and need a single IDE that can handle them all. Developed for multi-skilled and multi-talented developers HotHT...
XML-RPC for C and C++
XML-RPC is a quick-and-easy way to make procedure calls over the Internet. It converts the procedure call into XML document, sends it to a remote server using HTTP, and gets back the response a...
Download Standard Music description language #2 Download HotHTML 3 Professional 1.5.3000b HotHTML 3 is a windows HTML/Text editor for developers that write in multiple languages and need a single IDE that can handle them all. Developed for multi-skilled and multi-talented developers HotHT... Download XML-RPC for C and C++ XML-RPC is a quick-and-easy way to make procedure calls over  the Internet. It converts the procedure call into XML document,  sends it to a remote server using HTTP, and gets back the  response a...







Sponsored links

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
Localize software in three simple steps
Localize .Net, C/C++ & Delphi apps visually. HTML, HTML Help, XML & databases. Try Sisulizer now!
Localize Delphi software in three simple steps
Localize Delphi VCL & .Net apps visually. Plus HTML, HTML Help, XML & databases. Try Sisulizer now!


Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.