Lumiera  0.pre.03
»edit your freedom«
diagnostics.hpp
Go to the documentation of this file.
1 /*
2  DIAGNOSTICS.hpp - diagnostics and output helpers for time(code) values
3 
4  Copyright (C) Lumiera.org
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
44 #ifndef LIB_TIME_DIAGNOSTICS_H
45 #define LIB_TIME_DIAGNOSTICS_H
46 
47 #include "lib/time/timevalue.hpp"
48 #include "lib/time.h"
49 
50 #include <string>
51 
52 
53 namespace lib {
54 namespace time {
55 
56 
57 
58  /* === H:M:S:mm component diagnostics === */
59 
60  inline int
61  getHours (TimeValue const& t)
62  {
63  return lumiera_time_hours (_raw(t));
64  }
65 
66  inline int
67  getMins (TimeValue const& t)
68  {
69  return lumiera_time_minutes (_raw(t));
70  }
71 
72  inline int
73  getSecs (TimeValue const& t)
74  {
75  return lumiera_time_seconds (_raw(t));
76  }
77 
78  inline int
79  getMillis (TimeValue t)
80  {
81  return lumiera_time_millis (_raw(t));
82  }
83 
84 
85 
86 }} // lib::time
87 #endif
int lumiera_time_hours(gavl_time_t time)
Extract the hour part of given time.
Definition: time.cpp:544
Common functions for handling of time values.
int lumiera_time_millis(gavl_time_t time)
Extract the milliseconds part of given time.
Definition: time.cpp:562
Implementation namespace for support and library code.
int lumiera_time_seconds(gavl_time_t time)
Extract the seconds part of given time.
Definition: time.cpp:556
a family of time value like entities and their relationships.
int lumiera_time_minutes(gavl_time_t time)
Extract the minute part of given time.
Definition: time.cpp:550