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)
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
35 #ifndef LIB_TIME_DIAGNOSTICS_H
36 #define LIB_TIME_DIAGNOSTICS_H
37 
38 #include "lib/time/timevalue.hpp"
39 #include "lib/time.h"
40 
41 #include <string>
42 
43 
44 namespace lib {
45 namespace time {
46 
47 
48 
49  /* === H:M:S:mm component diagnostics === */
50 
51  inline int
52  getHours (TimeValue const& t)
53  {
54  return lumiera_time_hours (_raw(t));
55  }
56 
57  inline int
58  getMins (TimeValue const& t)
59  {
60  return lumiera_time_minutes (_raw(t));
61  }
62 
63  inline int
64  getSecs (TimeValue const& t)
65  {
66  return lumiera_time_seconds (_raw(t));
67  }
68 
69  inline int
70  getMillis (TimeValue t)
71  {
72  return lumiera_time_millis (_raw(t));
73  }
74 
75 
76 
77 }} // lib::time
78 #endif
int lumiera_time_hours(gavl_time_t time)
Extract the hour part of given time.
Definition: time.cpp:535
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:553
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:547
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:541