All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Wall Time

Detailed Description

Functions, data structures and other things related to wall clock time.

This module contains utilities to get the current time and create strings with formatted dates and times.

Note
When implementing a watchface or application that tells time, make sure to check out the tick_info field of PebbleAppHandlers.

Function Documentation

void clock_copy_time_string ( char *  buffer,
uint8_t  size 
)

Copies a time string into the buffer, formatted according to the user's time display preferences (such as 12h/24h time). Example results: "7:30" or "15:00".

Parameters
[out]bufferA pointer to the buffer to copy the time string into
sizeThe maximum size of buffer
bool clock_is_24h_style ( void  )

Gets the user's 12/24h clock style preference.

Returns
true if the user prefers 24h-style time display or false if the user prefers 12h-style time display.

Enumeration Type Documentation

enum TimeUnits

Time unit flags that can be used to create a bitmask for use in PebbleAppTickInfo.

See Also
PebbleAppTickInfo
PebbleAppHandlers
Enumerator
SECOND_UNIT 

Flag to represent the "seconds" time unit.

MINUTE_UNIT 

Flag to represent the "minutes" time unit.

HOUR_UNIT 

Flag to represent the "hours" time unit.

DAY_UNIT 

Flag to represent the "days" time unit.

MONTH_UNIT 

Flag to represent the "months" time unit.

YEAR_UNIT 

Flag to represent the "years" time unit.