From 1b07b25ad2eb26be45f7df744efa332a230d2baf Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 5 Jul 2000 00:25:30 +0000 Subject: [PATCH] Migrating timing support routines over to SimGear. --- simgear/timing/Makefile.am | 22 + simgear/timing/fg_time.cxx | 544 +++++++++++++++ simgear/timing/fg_time.hxx | 169 +++++ simgear/timing/geocoord.cxx | 102 +++ simgear/timing/geocoord.h | 98 +++ simgear/timing/lowleveltime.cxx | 1135 +++++++++++++++++++++++++++++++ simgear/timing/lowleveltime.h | 128 ++++ simgear/timing/timezone.cxx | 147 ++++ simgear/timing/timezone.h | 72 ++ 9 files changed, 2417 insertions(+) create mode 100644 simgear/timing/Makefile.am create mode 100644 simgear/timing/fg_time.cxx create mode 100644 simgear/timing/fg_time.hxx create mode 100644 simgear/timing/geocoord.cxx create mode 100644 simgear/timing/geocoord.h create mode 100644 simgear/timing/lowleveltime.cxx create mode 100644 simgear/timing/lowleveltime.h create mode 100644 simgear/timing/timezone.cxx create mode 100644 simgear/timing/timezone.h diff --git a/simgear/timing/Makefile.am b/simgear/timing/Makefile.am new file mode 100644 index 00000000..16f6416d --- /dev/null +++ b/simgear/timing/Makefile.am @@ -0,0 +1,22 @@ +includedir = @includedir@/timing + +lib_LIBRARIES = libsgtiming.a + +include_HEADERS = \ + fg_time.hxx \ + geocoord.h \ + timezone.h + +libsgtiming_a_SOURCES = \ + fg_time.cxx \ + geocoord.cxx \ + lowleveltime.cxx lowleveltime.h \ + timezone.cxx \ + # event.cxx event.hxx \ + # fg_timer.cxx fg_timer.hxx \ + # light.cxx light.hxx \ + # moonpos.cxx moonpos.hxx \ + # sunpos.cxx sunpos.hxx \ + # timestamp.hxx + +INCLUDES += -I$(top_builddir) diff --git a/simgear/timing/fg_time.cxx b/simgear/timing/fg_time.cxx new file mode 100644 index 00000000..d5263dc4 --- /dev/null +++ b/simgear/timing/fg_time.cxx @@ -0,0 +1,544 @@ +// fg_time.cxx -- data structures and routines for managing time related stuff. +// +// Written by Curtis Olson, started August 1997. +// +// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License as +// published by the Free Software Foundation; either version 2 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +// $Id$ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef FG_HAVE_STD_INCLUDES +# include +# include +# include +# include +#else +# include +# include +# include +# include +#endif + +#ifdef HAVE_SYS_TIMEB_H +# include // for ftime() and struct timeb +#endif +#ifdef HAVE_UNISTD_H +# include // for gettimeofday() +#endif +#ifdef HAVE_SYS_TIME_H +# include // for get/setitimer, gettimeofday, struct timeval +#endif + +#include +#include +// #include +#include + +// #include +// #include
+// #include