How do you include time_t on an Arduino?

Sponge Bob picture Sponge Bob · Jul 13, 2012 · Viewed 15.6k times · Source

I am trying to compile and upload one of the example WiFly projects to my Arduino. One of the example's functions is has return-type 'time_t', but the compiler doesn't recognize that. I have tried including both <ctime> and <time.h>.

This is my first time really using C++, So how do I import 'time_t' on my Arduino?

Answer

user7116 picture user7116 · Jul 13, 2012

Apparently you'll need to do two things to use time_t on your Arduino.

  1. Download the Time Library
  2. Include <Time.h> (note the capital T)