Last change
on this file since 457 was 457, checked in by coas-nagasima, 4 years ago |
ファイルを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-chdr;charset=UTF-8
|
File size:
1.1 KB
|
Rev | Line | |
---|
[457] | 1 | // Copyright (c) Microsoft. All rights reserved.
|
---|
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
---|
| 3 |
|
---|
| 4 | #ifndef TICKCOUNTER_H
|
---|
| 5 | #define TICKCOUNTER_H
|
---|
| 6 |
|
---|
| 7 | #ifdef __cplusplus
|
---|
| 8 | #include <cstdint>
|
---|
| 9 | #else
|
---|
| 10 | #include <stdint.h>
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 | #include "umock_c/umock_c_prod.h"
|
---|
| 14 |
|
---|
| 15 | #ifdef __cplusplus
|
---|
| 16 | extern "C"
|
---|
| 17 | {
|
---|
| 18 | #endif /* __cplusplus */
|
---|
| 19 |
|
---|
| 20 | #if defined(_WIN32) || defined(__MBED__) || defined(__APPLE__)
|
---|
| 21 | typedef uint_fast64_t tickcounter_ms_t; // Use 64-bit because of 32-bit is going to roll over back to zero after roughly 49.7 days that is not good for IoT devices which need keep running for months
|
---|
| 22 | #else
|
---|
| 23 | typedef uint_fast32_t tickcounter_ms_t;
|
---|
| 24 | #endif
|
---|
| 25 | typedef struct TICK_COUNTER_INSTANCE_TAG *TICK_COUNTER_HANDLE;
|
---|
| 26 |
|
---|
| 27 | MOCKABLE_FUNCTION(, TICK_COUNTER_HANDLE, tickcounter_create);
|
---|
| 28 | MOCKABLE_FUNCTION(, void, tickcounter_destroy, TICK_COUNTER_HANDLE, tick_counter);
|
---|
| 29 | MOCKABLE_FUNCTION(, int, tickcounter_get_current_ms, TICK_COUNTER_HANDLE, tick_counter, tickcounter_ms_t *, current_ms);
|
---|
| 30 |
|
---|
| 31 | #ifdef __cplusplus
|
---|
| 32 | }
|
---|
| 33 | #endif /* __cplusplus */
|
---|
| 34 |
|
---|
| 35 | #endif /* TICKCOUNTER_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.