Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / Visual Basic

Timers & Timings

Rate me:
Please Sign up or sign in to vote.
2.77/5 (7 votes)
7 Apr 20052 min read 63.5K   4.6K   24  
Produce timed event flags, functions, threads & timings therof.
#ifndef __TIM_src
#define	__TIM_src 1
// ====================================================================	//
//			    T I M _ s r c . h				//
// --------------------------------------------------------------------	//
// The Timer library needs this header file.				//
// ====================================================================	//

// ====================================================================	//
// Includes								//
// ====================================================================	//
#include "TIMcalls.h"

// ====================================================================	//
// Definitions								//
// ====================================================================	//
#define	TIMver	"3.4.1.1"
#define	TIMdat	"05/04/05"

#define	dbgjpmval    0		// 0none,1thread,2user,3all,4basic

// ====================================================================	//
// Typedefs								//
// ====================================================================	//
typedef struct {long siz; char err[32];}err_typ;

// ====================================================================	//
// tim_typ Typedef							//
// ====================================================================	//
typedef struct {
    long	  count;	// time counter
    long	  rptcnt;	// repeat counter
    HANDLE	  handle;	// Event handle for flag name
    char   flagna[MX_FL_LEN+1];	// Flag name (up to 15 chars)
    void	(*fnp)(void*);	// ptr to function to be called
    void	(*thp)(void*);	// ptr to thread to be spun off
    void	 *prm;		// parameter for fnctn/thread
}tim_typ;

// ====================================================================	//
// timF_typ Typedef							//
// ====================================================================	//
typedef struct {
    void	(*fnp)(void*);	// ptr to function to be called
    void	 *prm;		// parameter for fnctn/thread
}timF_typ;


#endif//__TIM_src


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
BSc (St.Andrews(1963-67))
MSCE
Systems Programmer 39+yrs
Married to first wife 35yrs & counting, four grown-up children
Religious opinions similar to MelG's
It is not the gnosis, but the praxis must be the fruit. (Aristotle)

Comments and Discussions