Timer. h : 'now()' not declared in scope

I have several sketches that have the following line in the code. It works fine in the 1.6.9 release of the IDE, but not in 1.6.10 or 1.6.11.

t = now();

After upgrading, I get an error message that " 'now' is not declared in this scope".

I have reverted back to release 1.6.9 and it works fine. I encountered this problem one time in the past also, and had to find a release in which it worked.

At the beginning of the sketch, I have the following statement.

#include <Time.h>

't' is declared as "unsigned long".

The Timer.h folder is located in the 'libraries' folder under the parent directory of the sketch being compiled. The library manager shows it as being installed.

Thanks,

kahorton

Do you see that black window at the bottom of the Arduino IDE window? It's called the console. When you have a compile error you need to scroll that window all the way to the top(helps to resize it larger) and start reading it from the top. That's where the first error in your program will be found. That first error is the one you need to fix, not the error at the bottom of the window, which likely is only caused by the first error and thus meaningless.

After, and only after, reading all through that console window, trying to figure out how to fix the error, doing a bunch of googling of the error messages, you still can't find the solution to the problem the next step is to ask for help here on the forum. You need to help us to help you. The way to do this is to give enough information. That means we need the entire console output, not just a fragment. When there is an error you'll see a button "Copy error message" on the right side of the orange bar. Click that button. Then paste the error in a forum post USING CODE TAGS(the </> button on the toolbar). The reason for the code tags is to make sure your error message is properly formatted, easy to read and copy to an editor or the IDE. Always use code tags when you post any warning/error message or code to the forum.

Now to fix your problem. Change the line

#include <Time.h>

to:

#include <TimeLib.h>