GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: fxe_system_time_get.c Lines: 5 5 100.0 %
Date: 2026-03-06 18:49:02 Branches: 6 6 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** FileX Component                                                       */
17
/**                                                                       */
18
/**   System                                                              */
19
/**                                                                       */
20
/**************************************************************************/
21
/**************************************************************************/
22
23
#define FX_SOURCE_CODE
24
25
26
/* Include necessary system files.  */
27
28
#include "fx_api.h"
29
#include "fx_system.h"
30
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _fxe_system_time_get                                PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    William E. Lamie, Microsoft Corporation                             */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function checks of errors in the get system time call.         */
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    hour                                  Pointer to hour               */
49
/*    minute                                Pointer to minute             */
50
/*    second                                Pointer to second             */
51
/*                                                                        */
52
/*  OUTPUT                                                                */
53
/*                                                                        */
54
/*    FX_PTR_ERROR                          Invalid destination pointer   */
55
/*    status                                Actual completion status      */
56
/*                                                                        */
57
/*  CALLS                                                                 */
58
/*                                                                        */
59
/*    _fx_system_time_get                   Actual get time service       */
60
/*                                                                        */
61
/*  CALLED BY                                                             */
62
/*                                                                        */
63
/*    Application Code                                                    */
64
/*                                                                        */
65
/**************************************************************************/
66
4
UINT  _fxe_system_time_get(UINT *hour, UINT *minute, UINT *second)
67
{
68
69
UINT status;
70
71
72
    /* Check for an invalid destination pointer.  */
73

4
    if ((hour == FX_NULL) || (minute == FX_NULL) || (second == FX_NULL))
74
    {
75
3
        return(FX_PTR_ERROR);
76
    }
77
78
    /* Call actual get time service.  */
79
1
    status =  _fx_system_time_get(hour, minute, second);
80
81
    /* Return status.  */
82
1
    return(status);
83
}
84