Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lin_time.h
Go to the documentation of this file.
1 /*
2  * Vega Strike
3  * Copyright (C) 2001-2002 Daniel Horn
4  *
5  * http://vegastrike.sourceforge.net/
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef _LIN_TIME_H_
23 #define _LIN_TIME_H_
24 #include "vegastrike.h"
25 
26 #define VEGA_EPOCH 1136073600. //Jan 1, 2006 GMT
27 
28 void InitTime();
29 double GetElapsedTime();
30 void UpdateTime();
31 void micro_sleep( unsigned int n );
32 double getNewTime();
33 void setNewTime( double newnewtime );
34 
35 //Essentially calling UpdateTime();getNewTime() without modifying any state.
36 //Always use this except at the beginning of a frame.
37 double queryTime();
38 
39 //like query time, but returns a monotonous increasing sequence
40 double realTime();
41 
42 extern float getTimeCompression();
43 extern void setTimeCompression( float tc );
44 
45 #endif
46