kodi
TimeUtils.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <stdint.h>
12 #include <string>
13 #include <time.h>
14 
15 class CDateTime;
16 
17 int64_t CurrentHostCounter(void);
18 int64_t CurrentHostFrequency(void);
19 
21 {
22 public:
23 
28  static void UpdateFrameTime(bool flip);
29 
34  static unsigned int GetFrameTime();
35  static CDateTime GetLocalTime(time_t time);
36 
41  static std::string WithoutSeconds(const std::string& hhmmss);
42 
43 private:
44  static unsigned int frameTime;
45 };
46 
static void UpdateFrameTime(bool flip)
Update the time frame.
Definition: TimeUtils.cpp:61
Definition: TimeUtils.h:20
static std::string WithoutSeconds(const std::string &hhmmss)
Returns a time string without seconds, i.e: HH:MM.
Definition: TimeUtils.cpp:105
DateTime class, which uses FileTime as it&#39;s base.
Definition: XBDateTime.h:63
static unsigned int GetFrameTime()
Returns the frame time in MS.
Definition: TimeUtils.cpp:77