From 47b7e067121bdc2045aa8d0f44319a231d215fab Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 24 Jan 2023 22:54:56 +0100 Subject: [PATCH] =?UTF-8?q?movieplayer:=20fix=20compiler=20warning:=20?= =?UTF-8?q?=E2=80=98int=20ftime(timeb*)=E2=80=99=20is=20deprecated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/32775394fcacfc9da006c458e136ac07f05e3094 Author: vanhofen Date: 2023-01-24 (Tue, 24 Jan 2023) Origin message was: ------------------ - movieplayer: fix compiler warning: ‘int ftime(timeb*)’ is deprecated --- src/gui/movieplayer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 473e75c8b..54023e3b9 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2651,10 +2651,9 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) // if we have a movie information, try to save the stop position printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info); if (isMovieBrowser && p_movie_info) { - timeb current_time; - ftime(¤t_time); - p_movie_info->dateOfLastPlay = current_time.time; - current_time.time = time(NULL); + timeval current_time; + gettimeofday(¤t_time, NULL); + p_movie_info->dateOfLastPlay = current_time.tv_sec; p_movie_info->bookmarks.lastPlayStop = position / 1000; if (p_movie_info->length == 0) { p_movie_info->length = (float)duration / 60 / 1000 + 0.5;