diff --git a/src/lib/time/quantiser.hpp b/src/lib/time/quantiser.hpp index b511ed53f..9db7d88c2 100644 --- a/src/lib/time/quantiser.hpp +++ b/src/lib/time/quantiser.hpp @@ -24,6 +24,8 @@ #ifndef LIB_TIME_QUANTISER_H #define LIB_TIME_QUANTISER_H +#include "lib/time/timevalue.hpp" + //#include #include diff --git a/src/lib/time/timecode.hpp b/src/lib/time/timecode.hpp index 2a8ef6750..d4aebf8c1 100644 --- a/src/lib/time/timecode.hpp +++ b/src/lib/time/timecode.hpp @@ -24,6 +24,8 @@ #ifndef LIB_TIME_TIMECODE_H #define LIB_TIME_TIMECODE_H +#include "lib/time/timevalue.hpp" + //#include #include diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 58095f85e..9388e5842 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -36,8 +36,6 @@ extern "C" { namespace lib { namespace time { - using lumiera::Time; - /** * fixed format time specification. @@ -45,15 +43,15 @@ namespace time { * @todo WIP-WIP-WIP */ class TimeValue - : boost::totally_ordered > + : boost::totally_ordered > { protected: gavl_time_t t_; public: - static const Time MAX ; - static const Time MIN ; + static const TimeValue MAX ; + static const TimeValue MIN ; explicit TimeValue (gavl_time_t val=0) @@ -100,21 +98,21 @@ namespace time { /** * Lumiera's internal time value datatype */ -//class Time -// : public TimeValue -// { -// public: -// explicit -// Time (TimeValue val=0) -// : TimeValue(val) -// { } -// -// Time ( long millis -// , uint secs -// , uint mins =0 -// , uint hours=0 -// ); -// }; + class Time + : public TimeValue + { + public: + explicit + Time (TimeValue val= TimeValue(0)) + : TimeValue(val) + { } + + Time ( long millis + , uint secs + , uint mins =0 + , uint hours=0 + ); + }; class Offset diff --git a/tests/lib/time/time-formats-test.cpp b/tests/lib/time/time-formats-test.cpp index ac9a52c5d..d11e5c3c2 100644 --- a/tests/lib/time/time-formats-test.cpp +++ b/tests/lib/time/time-formats-test.cpp @@ -40,8 +40,6 @@ namespace lib { namespace time{ namespace test{ - using lumiera::Time; - /******************************************************** * @test verify handling of grid aligned timecode values. @@ -56,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -65,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { } diff --git a/tests/lib/time/time-quantisation-test.cpp b/tests/lib/time/time-quantisation-test.cpp index ac3dd9393..e490661dd 100644 --- a/tests/lib/time/time-quantisation-test.cpp +++ b/tests/lib/time/time-quantisation-test.cpp @@ -40,8 +40,6 @@ namespace lib { namespace time{ namespace test{ - using lumiera::Time; - /******************************************************** * @test verify handling of time values, time intervals. @@ -56,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -65,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { } diff --git a/tests/lib/time/time-value-test.cpp b/tests/lib/time/time-value-test.cpp index e9e602d17..645f49b26 100644 --- a/tests/lib/time/time-value-test.cpp +++ b/tests/lib/time/time-value-test.cpp @@ -54,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -63,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { }