/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/time.h

  • Committer: Tim Marston
  • Date: 2012-03-09 23:42:20 UTC
  • Revision ID: tim@ed.am-20120309234220-xr1vxzve0o5n2oss
added support for eclipse project and converted to a manual Makefile

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        static Time &get_instance();
37
37
 
38
38
        /**
 
39
         * Get year.
 
40
         *
 
41
         * @return year
 
42
         */
 
43
        int get_year();
 
44
 
 
45
        /**
 
46
         * Get month.
 
47
         *
 
48
         * @return month, 1 to 12
 
49
         */
 
50
        int get_month();
 
51
 
 
52
        /**
 
53
         * Get month name.
 
54
         *
 
55
         * @return month name
 
56
         */
 
57
        const char *get_month_name();
 
58
 
 
59
        /**
 
60
         * Get day.
 
61
         *
 
62
         * @return date, 1 to 31
 
63
         */
 
64
        int get_day();
 
65
 
 
66
        /**
 
67
         * Get number suffix.
 
68
         *
 
69
         * @param number
 
70
         * @return suffix
 
71
         */
 
72
        const char *get_day_suffix();
 
73
 
 
74
        /**
39
75
         * Get hours.
40
76
         *
41
77
         * @return hours, 0 to 23
65
101
 
66
102
        Time();
67
103
 
 
104
        /** year */
 
105
        int _year;
 
106
 
 
107
        /** month */
 
108
        int _month;
 
109
 
 
110
        /** day */
 
111
        int _day;
 
112
 
68
113
        /** hours */
69
114
        int _hours;
70
115
 
76
121
 
77
122
private:
78
123
 
 
124
        /** probe the real-time clock device */
 
125
        void probe_rtc();
 
126
 
79
127
        /** milliseconds at last update */
80
128
        unsigned long _last_millis;
81
129