Add Time::all_as_seconds.
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 11:14:49 +0000 (11:14 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 11:21:16 +0000 (11:21 +0000)
src/sub_time.cc

index 3f4d1e984788cbda4a7ebe47e9d86adadef13d27..ed61cb445522d7655c7bb3a9cf3871535fd0ba66 100644 (file)
@@ -156,9 +156,5 @@ Time::from_hms (int h, int m, int s, int ms)
 double
 Time::all_as_seconds () const
 {
-       if (!_rate) {
-               throw UnknownFrameRateError ();
-       }
-       
-       return _seconds + double (_frames) / _rate.get().fraction ();
+       return seconds() + double(milliseconds ()) / 1000;
 }