1 | /************************************************************************** |
---|
2 | * |
---|
3 | * Copyright (c) 2013 Alcatel-Lucent |
---|
4 | * |
---|
5 | * Alcatel Lucent licenses this file to You under the Apache License, |
---|
6 | * Version 2.0 (the "License"); you may not use this file except in |
---|
7 | * compliance with the License. A copy of the License is contained the |
---|
8 | * file LICENSE at the top level of this repository. |
---|
9 | * You may also obtain a copy of the License at: |
---|
10 | * |
---|
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
12 | * |
---|
13 | * Unless required by applicable law or agreed to in writing, software |
---|
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
16 | * See the License for the specific language governing permissions and |
---|
17 | * limitations under the License. |
---|
18 | * |
---|
19 | ************************************************************************** |
---|
20 | * |
---|
21 | * date.h |
---|
22 | * |
---|
23 | * Original author: Ed Sutter (ed.sutter@alcatel-lucent.com) |
---|
24 | * |
---|
25 | */ |
---|
26 | struct todinfo { |
---|
27 | char day; /* 1-7 (sun = 1) */ |
---|
28 | char date; /* 1-31 */ |
---|
29 | char month; /* 1-12 */ |
---|
30 | char hour; /* 0-23 */ |
---|
31 | char minute; /* 0-59 */ |
---|
32 | char second; /* 0-59 */ |
---|
33 | short year; /* full number (i.e. 2006) */ |
---|
34 | }; |
---|
35 | |
---|
36 | extern int showDate(int center); |
---|
37 | extern int timeofday(int cmd, void *arg); |
---|
38 | extern int setTimeAndDate(struct todinfo *now); |
---|
39 | extern int getTimeAndDate(struct todinfo *now); |
---|
40 | |
---|
41 | /* #defines used by the uMon API mon_timeofday()... |
---|
42 | */ |
---|
43 | #define TOD_ON 1 |
---|
44 | #define TOD_OFF 2 |
---|
45 | #define TOD_SET 3 |
---|
46 | #define TOD_GET 4 |
---|