Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE EthernetInterface NTPClient mbed-rtos mbed SDFileSystem wavfile
Clock.h
- Committer:
- dudanian
- Date:
- 2014-12-02
- Revision:
- 0:4e6ae21cbd31
- Child:
- 2:c939d0501184
File content as of revision 0:4e6ae21cbd31:
#include "mbed.h"
#include "NTPClient.h"
// AM/PM
const int AM = 0;
const int PM = 12;
// Timezones
const int PST = -8;
const int MST = -7;
const int CST = -6;
const int EST = -5;
const int UTC = 0;
class Clock {
public:
Clock();
void setTime(int hour, int minute, int period);
void setTimezone(int timezone);
int syncTime();
time_t getTime();
int getTimezone();
private:
int timezone;
static bool isSet;
};