Nigel Rantor / azure_c_shared_utility

Fork of azure_c_shared_utility by Azure IoT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tickcounter.h Source File

tickcounter.h

00001 // Copyright (c) Microsoft. All rights reserved.
00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
00003 
00004 #ifndef TICKCOUNTER_H
00005 #define TICKCOUNTER_H
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #include <cstdint>
00010 #else
00011 #include <stdint.h>
00012 #endif /* __cplusplus */
00013 
00014 #include "azure_c_shared_utility/umock_c_prod.h"
00015 
00016     typedef uint_fast32_t tickcounter_ms_t;
00017     typedef struct TICK_COUNTER_INSTANCE_TAG* TICK_COUNTER_HANDLE;
00018 
00019     MOCKABLE_FUNCTION(, TICK_COUNTER_HANDLE, tickcounter_create);
00020     MOCKABLE_FUNCTION(, void, tickcounter_destroy, TICK_COUNTER_HANDLE, tick_counter);
00021     MOCKABLE_FUNCTION(, int, tickcounter_get_current_ms, TICK_COUNTER_HANDLE, tick_counter, tickcounter_ms_t*, current_ms);
00022 
00023 #ifdef __cplusplus
00024 }
00025 #endif /* __cplusplus */
00026 
00027 #endif /* TICKCOUNTER_H */