diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-20 11:14:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-20 11:21:16 +0000 |
| commit | a320a9a29f9c3320c09ba150633128e5c8729eec (patch) | |
| tree | 7d6c3ce8f8b31165f4dacd48908fab0950efdb24 /src | |
| parent | e70f560b63aa5c17d2f7f102f232cf4d5cd4c807 (diff) | |
Add Time::all_as_seconds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sub_time.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/sub_time.cc b/src/sub_time.cc index 3f4d1e9..ed61cb4 100644 --- a/src/sub_time.cc +++ b/src/sub_time.cc @@ -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; } |
