RTC Question

06 Dec 2009

Where can I find time.h?

06 Dec 2009

From the following links it looks like it doesn't exist.



06 Dec 2009

Been in the primary svn trunk, its not public, need to know time_t type base to use it, the output functions all appear to be string format, which is fine for serial, file attributes and display work, but useless having to convert it all back for internal operations.


06 Dec 2009

NVM I worked it out, will post some code of what I am attempting to do shortly

06 Dec 2009


Andrew Harpin wrote:
need to know time_t type base to use it
It is defined as:

typedef unsigned int time_t;
This is the common type definition on most 32-bit systems.

A good reference for all the time related functions you can use in C is something like the time.h page on C++ Reference. And you can just use it as an integer too if you want to do some low level maths based on it being seconds since Jan 1970.


29 May 2011


Is there any way to get milliseconds out of the Mbed or any 4-wire SPI RTC chip with milliseconds resolution? Found some with hundreds of seconds but i would need to go lower then that.


30 May 2011


Setup a free running 1KHz timer then sync it to the RTC using an interrupt service.


31 May 2011

Thanks will give it a go!

28 May 2012

I set the RTC to generate an interrupt each second, and do a timer.reset in the interrupt routine to get the micro-second timer synchronizd to the RTC second.