Merge pull request #26148 from ksooo/fix-secondstotimestring-warning
[xbmc.git] / xbmc / utils / TimeUtils.h
blobd7740d7c5757a2f8b1337e2e466fdfbdaa97d006
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include <stdint.h>
12 #include <string>
13 #include <time.h>
15 class CDateTime;
17 int64_t CurrentHostCounter(void);
18 int64_t CurrentHostFrequency(void);
20 class CTimeUtils
22 public:
24 /*!
25 * @brief Update the time frame
26 * @note Not threadsafe
28 static void UpdateFrameTime(bool flip);
30 /*!
31 * @brief Returns the frame time in MS
32 * @note Not threadsafe
34 static unsigned int GetFrameTime();
35 static CDateTime GetLocalTime(time_t time);
37 /*!
38 * @brief Returns a time string without seconds, i.e: HH:MM
39 * @param hhmmss Time string in the format HH:MM:SS
41 static std::string WithoutSeconds(const std::string& hhmmss);
43 private:
44 static unsigned int frameTime;