Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

timer.c

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  Timer                                                                               */
00003 /*                                                                                      */
00004 /*  Author: Charles Bloom                                                               */
00005 /*  Description: A nice little profiling utility                                        */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*Genesis3D Version 1.1 released November 15, 1999                            */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 
00023 #include "timer.h"
00024 
00025 FILE * timerFP = stdout;
00026 
00027 int timerCount = 0;
00028 
00029 double time_Master = 0.0;
00030 static tsc_type tsc_Master;
00031 
00032 void Timer_Start(void)
00033 {
00034 readTSC(tsc_Master);
00035 }
00036 void Timer_Stop(void)
00037 {
00038 tsc_type tsc_Master2;
00039 readTSC(tsc_Master2);
00040 time_Master += diffTSC(tsc_Master,tsc_Master2);
00041 }

Generated on Tue Sep 30 12:36:31 2003 for GTestAndEngine by doxygen 1.3.2