Mayank Gupta / Mbed OS pelion-example-frdm

Dependencies:   FXAS21002 FXOS8700Q

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pal_time.c Source File

pal_time.c

00001 /*******************************************************************************
00002  * Copyright 2016-2018 ARM Ltd.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *******************************************************************************/
00016 
00017 #include "pal.h"
00018 #include "pal_time.h"
00019 #include "pal_plat_time.h"
00020 
00021 #define TRACE_GROUP "PAL"
00022 
00023 
00024 palStatus_t pal_initTime(void)
00025 {
00026     palStatus_t status;
00027     status = pal_plat_initTime();
00028     return status;
00029 }
00030 
00031 uint64_t pal_osGetTime(void)
00032 {
00033     uint64_t os_time;
00034     os_time = pal_plat_osGetTime();
00035     return os_time;
00036 }
00037 
00038 palStatus_t pal_osSetTime(uint64_t seconds)
00039 {
00040     palStatus_t status;
00041     status = pal_plat_osSetTime(seconds);
00042     return status;
00043 }
00044 
00045 palStatus_t pal_osSetStrongTime(uint64_t setNewTimeInSeconds)
00046 {
00047     palStatus_t status;
00048     status = pal_plat_osSetStrongTime(setNewTimeInSeconds);
00049     return status;
00050 }
00051 
00052 palStatus_t pal_osSetWeakTime(uint64_t setNewTimeInSeconds)
00053 {
00054     palStatus_t status;
00055     status = pal_plat_osSetWeakTime(setNewTimeInSeconds);
00056     return status;
00057 }
00058