Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

timec.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00005       Neuenahrer Str. 20
00006       D - 53343 Wachtberg
00007       
00008 Email:    winkelholz@fgan.de
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 
00026 #ifndef TIMEC_H
00027 #define TIMEC_H
00028 
00029 #ifdef _WIN32
00030 #include <sys/timeb.h>
00031 #define timezone timeb
00032 #else
00033 #include <sys/time.h>
00034 #endif
00035 
00036 #include "../oawconfig.h"
00037 
00038 OAW_BEGIN_NAMESPACE
00039 
00040 class OAW_DLLMAPPING TimeC
00041 {
00042 public:
00043   TimeC();
00044   TimeC(double t);
00045   TimeC(long,long);
00046   TimeC& operator = (const TimeC& t);
00047   TimeC operator + (const TimeC& t);
00048   TimeC operator - (const TimeC& t);
00049   int operator < (const TimeC& t); 
00050   int operator > (const TimeC& t); 
00051   int operator <= (const TimeC& t); 
00052   int operator >= (const TimeC& t); 
00053   int operator == (const TimeC& t); 
00054   int operator != (const TimeC& t);
00055   TimeC SetPresentTime();
00056   TimeC Set(long,long);
00057   long GetSec(){return m_sgn*m_sec;}
00058   long GetMsec(){return m_usec/1000;}
00059   long GetUsec(){return m_usec;}
00060   void SetUsec(long l){m_usec=l;}
00061   void Writeln();
00062   void Write();
00063   operator double() const;
00064 protected:
00065   struct timezone m_timezone;
00066   long m_sec;
00067   long m_usec;
00068   short m_sgn;
00069 };
00070 
00071 OAW_END_NAMESPACE
00072 
00073 
00074 #endif
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 

Generated on Tue Jul 29 14:24:15 2003 for Open ActiveWrl by doxygen1.3-rc2