summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-20 11:14:49 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-20 11:21:16 +0000
commita320a9a29f9c3320c09ba150633128e5c8729eec (patch)
tree7d6c3ce8f8b31165f4dacd48908fab0950efdb24 /src
parente70f560b63aa5c17d2f7f102f232cf4d5cd4c807 (diff)
Add Time::all_as_seconds.
Diffstat (limited to 'src')
-rw-r--r--src/sub_time.cc6
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;
}