This:
#define LIGHTON 3600000
would be better as:
#define LIGHTON 3600000UL
Strange things happen when you use constant literals that won't fit in an int without their appropriate suffix.
This:
#define LIGHTON 3600000
would be better as:
#define LIGHTON 3600000UL
Strange things happen when you use constant literals that won't fit in an int without their appropriate suffix.