C Porting Layer API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E80003-19
|
00001 /* 00002 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. 00003 * 00004 * This software is dual-licensed to you under the MIT License (MIT) and 00005 * the Universal Permissive License (UPL). See the LICENSE file in the root 00006 * directory for license terms. You may choose either license, or both. 00007 */ 00008 00014 #ifndef IOTCS_PORT_SYSTEM_H 00015 #define IOTCS_PORT_SYSTEM_H 00016 00017 00018 #ifdef __cplusplus 00019 extern "C" { 00020 #endif 00021 00022 #include <inttypes.h> 00023 #include "iotcs_config.h" 00024 00025 #define IOTCS_SEC_TO_MILLISEC(sec) (((int64_t) (sec)) * 1000) 00026 00027 #define IOTCS_MILLISEC_TO_SEC(msec) ((msec) / 1000) 00028 #define IOTCS_MILLISEC_TO_NANOSEC(msec) ((msec) * 1000000) 00029 00030 #define IOTCS_MICROSEC_TO_MILLISEC(microsec) ((microsec) / 1000) 00031 #define IOTCS_MICROSEC_TO_NANOSEC(microsec) ((microsec) * 1000) 00032 00033 #define IOTCS_NANOSEC_TO_MILLISEC(nanosec) ((nanosec) / 1000000) 00034 00041 void iotcs_port_platform_init(); 00042 00049 void iotcs_port_platform_finilize(); 00050 00056 int64_t iotcs_port_get_current_time_millis(void); 00057 00071 void iotcs_port_set_current_time(int64_t seconds); 00072 00080 const char *iotcs_port_get_os_name(void); 00081 00089 const char *iotcs_port_get_os_version(void); 00090 00096 const char *iotcs_port_get_http_proxy(void); 00097 00098 00099 #ifdef __cplusplus 00100 } 00101 #endif 00102 00103 #endif /* IOTCS_PORT_SYSTEM_H */ 00104