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

only positive relative time is supported

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/branches/libdatrwxx.su
SVN Revision: 3473
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 86aa5898
......@@ -44,6 +44,8 @@ namespace libtime {
TRelativeTime double2time(const double& seconds)
{
libtime_assert(seconds>=0,
"ERROR (double2time): only positive values are accepted");
time_kernel::time_Ts thetime_Ts(TRelativeTime(0));
double remain=seconds;
typedef timeint li;
......
......@@ -92,7 +92,7 @@ INPUT_ENCODING = UTF-8
FILE_PATTERNS = README \
README.changelog \
*.h \
*.cc
*.cc *.c *.f
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
......
......@@ -75,6 +75,12 @@ namespace libtime {
* libtime::TAbsoluteTime
* -# relative times (like the time span between now and christmas) as
* supported by libtime::TRelativeTime
* For time differences (libtime::TRelativeTime) only positive values are
* accepted.
* Accidentally the library appears to handle negative value too.
* However, since the underlying Fortran code is designed to handle positive
* values only, functions should throw an exception upon negative values being
* passed.
*
* The modules in the library support operations like:
* - calculate the number of samples in a time window
......@@ -181,7 +187,14 @@ class TAbsoluteTime: public TBaseClassTime {
TAbsoluteTime &operator= (char *timestring);
};
//! class to contain relative times
/*! \brief class to contain relative times
*
* For time differences only positive values are accepted.
* Accidentally the library appears to handle negative value too.
* However, since the underlying Fortran code is designed to handle positive
* values only, functions should throw an exception upon negative values being
* passed.
*/
class TRelativeTime: public TBaseClassTime {
friend class TAbsoluteTime;
public:
......
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