diff options
author | Max Kellermann <max@duempel.org> | 2014-08-28 12:35:26 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-28 13:03:18 +0200 |
commit | 2efd8ef52ddf880c26d48bcb55eb1fd4c830481a (patch) | |
tree | 41110f0e91fad7ef12ac930ab19e5b96fa5962eb /src/db/LightSong.cxx | |
parent | 6ad933982f68f5fcbd1b3179bf5fed26f63aa792 (diff) | |
download | mpd-2efd8ef52ddf880c26d48bcb55eb1fd4c830481a.tar.gz mpd-2efd8ef52ddf880c26d48bcb55eb1fd4c830481a.tar.xz mpd-2efd8ef52ddf880c26d48bcb55eb1fd4c830481a.zip |
db/LightSong: use std::chrono::duration for start_ms and end_ms
Diffstat (limited to 'src/db/LightSong.cxx')
-rw-r--r-- | src/db/LightSong.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/LightSong.cxx b/src/db/LightSong.cxx index af1e801f8..3e0f361d8 100644 --- a/src/db/LightSong.cxx +++ b/src/db/LightSong.cxx @@ -23,11 +23,11 @@ double LightSong::GetDuration() const { - if (end_ms > 0) - return (end_ms - start_ms) / 1000.0; + if (end_time.IsPositive()) + return (end_time - start_time).ToDoubleS(); if (tag->time <= 0) return 0; - return tag->time - start_ms / 1000.0; + return tag->time - start_time.ToDoubleS(); } |