Commit f561a6c0 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new function

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1462
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 3ff91ee6
/* this is <base_constr.cc>
* ----------------------------------------------------------------------------
*
* $Id: base_constr.cc,v 1.7 2004-01-13 19:50:55 tforb Exp $
* $Id: base_constr.cc,v 1.8 2004-01-30 14:40:09 tforb Exp $
*
* 09/08/2000 by Thomas Forbriger (IfG Stuttgart)
*
......@@ -71,6 +71,16 @@ TRelativeTime::TRelativeTime(const double& seconds):
norm();
} // TRelativeTime::TRelativeTime(const double& seconds)
double time2double(const TRelativeTime& rtime)
{
double retval(0.);
retval=rtime.float_seconds();
retval += 60.*rtime.minute();
retval += 3600.*rtime.hour();
retval += 24.*3600.*rtime.days();
return(retval);
} // double time2float(const TRelativeTime&)
}; // namespace libtime
/* ----- END OF base_constr.cc ----- */
/* this is <libtime++.h>
* ----------------------------------------------------------------------------
*
* $Id: libtime++.h,v 2.11 2004-01-13 19:50:55 tforb Exp $
* $Id: libtime++.h,v 2.12 2004-01-30 14:40:08 tforb Exp $
*
* Copyright (c) by Thomas Forbriger (IfG Stuttgart)
*
......@@ -27,7 +27,7 @@
#ifndef TF_LIBTIME_H_
#define TF_LIBTIME_H_ \
"$Id: libtime++.h,v 2.11 2004-01-13 19:50:55 tforb Exp $";
"$Id: libtime++.h,v 2.12 2004-01-30 14:40:08 tforb Exp $";
#include <string>
#include "libtime.h"
......@@ -438,6 +438,7 @@ inline TRelativeTime &TRelativeTime::operator= (char *timestring)
* --------------
*/
TAbsoluteTime now();
double time2double(const TRelativeTime&);
/*E*/
} // namespace libtime
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment