TimeStamp.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef _TimeStamp_H
00019 #define _TimeStamp_H
00020 
00021 #include <time.h>
00022 
00023 //-------------------------------------------------------------------
00024 
00025 
00031 class TimeStamp
00032 {
00033 public:
00035         TimeStamp();
00036 
00038         virtual ~TimeStamp() {};
00039 
00041         void SetNow();
00042 
00044         double operator-(const TimeStamp& EarlierTime) const;
00045 
00047 
00049         void operator+=(double TimeS);
00050 
00052 
00054         void operator-=(double TimeS);
00055 
00057         bool operator>(const TimeStamp& Time);
00058 
00060         bool operator<(const TimeStamp& Time);
00061 
00065         void getTimeStamp(long& lSeconds, long& lNanoSeconds);
00066 
00070         void setTimeStamp(const long& lSeconds, const long& lNanoSeconds);
00071 
00072 
00073 protected:
00074 
00076         timespec m_TimeStamp;
00077 
00078 private:
00079 
00081         static double TimespecToDouble(const ::timespec& LargeInt);
00082 
00084         static ::timespec DoubleToTimespec(double TimeS);
00085 
00086 };
00087 
00088 #endif


cob_trajectory_controller
Author(s): Alexander Bubeck
autogenerated on Thu Jun 6 2019 21:19:22