Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c457519 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Moved the typedef of period_ms_t from alarm.h to time.h

Test: code compilation
Change-Id: Ib61126d7921d088b045dca6c5b69a5379603fcc3
parent 0d09fb6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include <stdbool.h>
#include <stdint.h>
#include "osi/include/time.h"

#ifdef __cplusplus
extern "C" {
@@ -28,7 +29,6 @@ extern "C" {
typedef struct alarm_t alarm_t;
typedef struct fixed_queue_t fixed_queue_t;
typedef struct thread_t thread_t;
typedef uint64_t period_ms_t;

// Prototype for the alarm callback function.
typedef void (*alarm_callback_t)(void *data);
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@
extern "C" {
#endif

typedef uint64_t period_ms_t;

// Get the OS boot time in milliseconds.
//
// NOTE: The return value will rollover every 49.7 days,
@@ -31,6 +33,10 @@ extern "C" {
// Relative time comparison using 32-bits integers such
// as (t2_u32 - t1_u32 < delta_u32) should work as expected as long
// as there is no multiple rollover between t2_u32 and t1_u32.
//
// TODO: This function's return type should be modified to |period_ms_t|.
// Be careful: some of the code that is using it assumes the return type
// is uint32_t.
uint32_t time_get_os_boottime_ms(void);

// Get the OS boot time in microseconds.