1 /***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the MIT License which is available at
6 * https://opensource.org/licenses/MIT.
7 *
8 * SPDX-License-Identifier: MIT
9 **************************************************************************/
10
11
12 /**************************************************************************/
13 /**************************************************************************/
14 /** */
15 /** FileX Component */
16 /** */
17 /** System */
18 /** */
19 /**************************************************************************/
20 /**************************************************************************/
21
22 #define FX_SOURCE_CODE
23
24
25 /* Include necessary system files. */
26
27 #include "fx_api.h"
28 #include "fx_system.h"
29
30
31 /**************************************************************************/
32 /* */
33 /* FUNCTION RELEASE */
34 /* */
35 /* _fxe_system_time_get PORTABLE C */
36 /* 6.1 */
37 /* AUTHOR */
38 /* */
39 /* William E. Lamie, Microsoft Corporation */
40 /* */
41 /* DESCRIPTION */
42 /* */
43 /* This function checks of errors in the get system time call. */
44 /* */
45 /* INPUT */
46 /* */
47 /* hour Pointer to hour */
48 /* minute Pointer to minute */
49 /* second Pointer to second */
50 /* */
51 /* OUTPUT */
52 /* */
53 /* FX_PTR_ERROR Invalid destination pointer */
54 /* status Actual completion status */
55 /* */
56 /* CALLS */
57 /* */
58 /* _fx_system_time_get Actual get time service */
59 /* */
60 /* CALLED BY */
61 /* */
62 /* Application Code */
63 /* */
64 /* RELEASE HISTORY */
65 /* */
66 /* DATE NAME DESCRIPTION */
67 /* */
68 /* 05-19-2020 William E. Lamie Initial Version 6.0 */
69 /* 09-30-2020 William E. Lamie Modified comment(s), */
70 /* resulting in version 6.1 */
71 /* */
72 /**************************************************************************/
_fxe_system_time_get(UINT * hour,UINT * minute,UINT * second)73 UINT _fxe_system_time_get(UINT *hour, UINT *minute, UINT *second)
74 {
75
76 UINT status;
77
78
79 /* Check for an invalid destination pointer. */
80 if ((hour == FX_NULL) || (minute == FX_NULL) || (second == FX_NULL))
81 {
82 return(FX_PTR_ERROR);
83 }
84
85 /* Call actual get time service. */
86 status = _fx_system_time_get(hour, minute, second);
87
88 /* Return status. */
89 return(status);
90 }
91
92