AceTime 3.0.0 Date and time classes for Arduino that support timezones from the TZ Database.

common.h
Go to the documentation of this file.
1 /*
2 * MIT License
3 * Copyright (c) 2018 Brian T. Park
4 */
5
6 #ifndef ACE_TIME_COMMON_COMMON_H
7 #define ACE_TIME_COMMON_COMMON_H
8
9 #include <stdint.h>
10
17 namespace ace_time {
18
24 typedef int32_t acetime_t;
25
44 const uint8_t kAbbrevSize = 7 + 1;
45
47 template <typename T>
48 void swap(T& a, T& b) {
49 T tmp = a;
50 a = b;
51 b = tmp;
52 }
53
54 }
55
56 #endif
ace_time::swap
void swap(T &a, T &b)
Swap 2 parameters.
Definition: common.h:48
ace_time::kAbbrevSize
const uint8_t kAbbrevSize
Size of the c-string buffer needed to hold a time zone abbreviation.
Definition: common.h:44
ace_time::acetime_t
int32_t acetime_t
Type for the number of seconds from epoch.
Definition: common.h:24