waggle-sensor / wagman

The Waggle Manager (Wagman), a custom circuit board and control system for Wild Waggle Nodes
1 stars 3 forks source link

Add time unit constants #23

Open seanshahkarami opened 7 years ago

seanshahkarami commented 7 years ago

This is a simple, but can prevent some dumb mistakes. I'll add something like:

const unsigned long SECOND, SECONDS = 1000L;
const unsigned long MINUTE, MINUTES = 60000L;
const unsigned long HOUR, HOURS = 3600000L;
const unsigned long DAY, DAYS = 86400000L;

That way, you can write timing code that looks like:

timer.schedule(4 * HOURS);