playlist_control: use GTimer in previousSongInPlaylist()

To determine whether to rewind the current song or to go to the
previous song, use a GTimer instead of manually diffing time(NULL).
This commit is contained in:
Max Kellermann
2009-04-25 14:08:31 +02:00
parent d2010c0289
commit 616dc9d465
3 changed files with 15 additions and 6 deletions

View File

@@ -61,12 +61,16 @@ playlist_init(struct playlist *playlist)
playlist->queued = -1;
playlist->current = -1;
playlist->prev_elapsed = g_timer_new();
}
void
playlist_finish(struct playlist *playlist)
{
queue_finish(&playlist->queue);
g_timer_destroy(playlist->prev_elapsed);
}
/**