aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/LightSong.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-28 12:35:26 +0200
committerMax Kellermann <max@duempel.org>2014-08-28 13:03:18 +0200
commit2efd8ef52ddf880c26d48bcb55eb1fd4c830481a (patch)
tree41110f0e91fad7ef12ac930ab19e5b96fa5962eb /src/db/LightSong.cxx
parent6ad933982f68f5fcbd1b3179bf5fed26f63aa792 (diff)
downloadmpd-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 '')
-rw-r--r--src/db/LightSong.cxx6
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();
}