projects
/
libsub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e70f560
)
Add Time::all_as_seconds.
author
Carl Hetherington
<cth@carlh.net>
Tue, 20 Jan 2015 11:14:49 +0000
(11:14 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 20 Jan 2015 11:21:16 +0000
(11:21 +0000)
src/sub_time.cc
patch
|
blob
|
history
diff --git
a/src/sub_time.cc
b/src/sub_time.cc
index 3f4d1e984788cbda4a7ebe47e9d86adadef13d27..ed61cb445522d7655c7bb3a9cf3871535fd0ba66 100644
(file)
--- 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;
}