aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-28 06:54:19 +0200
committerMax Kellermann <max@duempel.org>2014-08-28 13:03:18 +0200
commit6ad933982f68f5fcbd1b3179bf5fed26f63aa792 (patch)
treef0aee7be7dd2caba5a795602bf519739ed6cefc0 /test
parent854258f37626d40271a821d4835e9cfb946c8ad8 (diff)
downloadmpd-6ad933982f68f5fcbd1b3179bf5fed26f63aa792.tar.gz
mpd-6ad933982f68f5fcbd1b3179bf5fed26f63aa792.tar.xz
mpd-6ad933982f68f5fcbd1b3179bf5fed26f63aa792.zip
DetachedSong: use std::chrono::duration for start_ms and end_ms
Diffstat (limited to 'test')
-rw-r--r--test/dump_playlist.cxx4
-rw-r--r--test/test_translate_song.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index 1262979e9..6205c8a79 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -128,8 +128,8 @@ int main(int argc, char **argv)
while ((song = playlist->NextSong()) != NULL) {
printf("%s\n", song->GetURI());
- const unsigned start_ms = song->GetStartMS();
- const unsigned end_ms = song->GetEndMS();
+ const unsigned start_ms = song->GetStartTime().ToMS();
+ const unsigned end_ms = song->GetEndTime().ToMS();
if (end_ms > 0)
printf("range: %u:%02u..%u:%02u\n",
diff --git a/test/test_translate_song.cxx b/test/test_translate_song.cxx
index 374fd34a2..324a79d29 100644
--- a/test/test_translate_song.cxx
+++ b/test/test_translate_song.cxx
@@ -185,15 +185,15 @@ ToString(const DetachedSong &song)
result.push_back('|');
- if (song.GetStartMS() > 0) {
- sprintf(buffer, "%u", song.GetStartMS());
+ if (song.GetStartTime().IsPositive()) {
+ sprintf(buffer, "%u", song.GetStartTime().ToMS());
result.append(buffer);
}
result.push_back('-');
- if (song.GetEndMS() > 0) {
- sprintf(buffer, "%u", song.GetEndMS());
+ if (song.GetEndTime().IsPositive()) {
+ sprintf(buffer, "%u", song.GetEndTime().ToMS());
result.append(buffer);
}