]> git.mxchange.org Git - flightgear.git/blobdiff - Time/fg_time.hxx
Modifications to incorporate Jon S. Berndts flight model code.
[flightgear.git] / Time / fg_time.hxx
index b0a31c3c756049a2353d1006c7c830ac64d1e42b..a784531fef8e10686b7af292be5f640b31c49443 100644 (file)
 #endif
 
 #include <GL/glut.h>
-#include <time.h>
 
-#include <Include/fg_types.h>
-#include <Flight/flight.h>
+#include "Include/compiler.h"
+#ifdef FG_HAVE_STD_INCLUDES
+#  include <ctime>
+#else
+#  include <time.h>
+#endif
+
+#include <FDM/flight.hxx>
 
 
 // Define a structure containing global time parameters
-struct fgTIME {
+typedef struct {
     // the date/time in various forms
     // Unix "calendar" time in seconds
     time_t cur_time;
@@ -80,41 +85,65 @@ struct fgTIME {
     // How much to change the value of warp each iteration.  Allows us
     // to make time progress faster than normal.
     long int warp_delta; 
-};
-
-extern struct fgTIME cur_time_params;
-
-
-typedef struct fg_timestamp_t {
-    long seconds;
-    long millis;
-} fg_timestamp;
 
+    // Paused (0 = no, 1 = yes)
+    int pause;
+} fgTIME;
 
-// Portability wrap to get current time.
-void timestamp(fg_timestamp *timestamp);
-
-
-// Return duration in millis from first to last
-long timediff(fg_timestamp *first, fg_timestamp *last);
-
-
-// Return new timestamp given a time stamp and an interval to add in
-void timesum(fg_timestamp *res, fg_timestamp *start, long millis);
+extern fgTIME cur_time_params;
 
 
 // Update time variables such as gmt, julian date, and sidereal time
-void fgTimeInit(struct fgTIME *t);
+void fgTimeInit(fgTIME *t);
 
 
 // Update the time dependent variables
-void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t);
+void fgTimeUpdate(FGInterface *f, fgTIME *t);
 
 
 #endif // _FG_TIME_HXX
 
 
 // $Log$
+// Revision 1.14  1999/02/05 21:29:19  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
+// Revision 1.13  1999/02/01 21:33:39  curt
+// Renamed FlightGear/Simulator/Flight to FlightGear/Simulator/FDM since
+// Jon accepted my offer to do this and thought it was a good idea.
+//
+// Revision 1.12  1999/01/07 20:25:35  curt
+// Portability changes and updates from Bernie Bright.
+//
+// Revision 1.11  1998/12/05 15:54:29  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
+// Revision 1.10  1998/12/05 14:21:31  curt
+// Moved struct fg_timestamp to class fgTIMESTAMP and moved it's definition
+// to it's own file, timestamp.hxx.
+//
+// Revision 1.9  1998/12/04 01:32:50  curt
+// Converted "struct fg_timestamp" to "class fgTIMESTAMP" and added some
+// convenience inline operators.
+//
+// Revision 1.8  1998/10/16 23:28:00  curt
+// C++-ifying.
+//
+// Revision 1.7  1998/10/16 00:56:09  curt
+// Converted to Point3D class.
+//
+// Revision 1.6  1998/07/27 18:42:22  curt
+// Added a pause option.
+//
+// Revision 1.5  1998/05/22 21:14:54  curt
+// Rewrote event.cxx in C++ as a class using STL for the internal event list
+// and run queue this removes the arbitrary list sizes and makes things much
+// more dynamic.  Because this is C++-classified we can now have multiple
+// event_tables if we'd ever want them.
+//
+// Revision 1.4  1998/04/28 01:22:17  curt
+// Type-ified fgTIME and fgVIEW.
+//
 // Revision 1.3  1998/04/25 22:06:34  curt
 // Edited cvs log messages in source files ... bad bad bad!
 //