source: rrlib_util/tTransformTime.h @ 59:b7d576f653e4

Last change on this file since 59:b7d576f653e4 was 59:b7d576f653e4, checked in by Bernd-Helge Schaefer <schaefer@…>, 7 years ago

added tTransformTime which allows to change the time base of timestamps

File size: 1.9 KB
Line 
1//
2// You received this file as part of MCA2
3// Modular Controller Architecture Version 2
4//
5//Copyright (C) Robotics Research Lab (RRLab) University of Kaiserslautern
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// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
22//----------------------------------------------------------------------
23/*!\file    tTransformTime.h
24 *
25 * \author  Bernd Helge Schaefer
26 * \date    06.06.2006
27 *
28 * \brief   Contains class tTransformTime
29 *
30 */
31//----------------------------------------------------------------------
32// this is a -*- C++ -*- file
33//----------------------------------------------------------------------
34
35#ifndef _tTransformTime_h_
36#define _tTransformTime_h_
37
38#include "rrlib/util/tTime.h"
39
40namespace rrlib
41{
42namespace util
43{
44
45class tTransformTime
46{
47public:
48  tTransformTime(const tTime& transformante_time_base,
49                 const tTime& transformer_time_base);
50
51  void ChangeTimeBase(const tTime& transformante_time_base,
52                      const tTime& transformer_time_base);
53
54  void Transform(tTime& transformante, const tTime& transformer);
55
56private:
57  tTime last_transformante;
58  tTime last_transformer;
59};
60
61// end of namespace declaration
62} //namespace util
63} // namespace rrlib
64
65
66#endif
Note: See TracBrowser for help on using the repository browser.