Change frequency to double to allow for time-accurate long periods

By changing frequency from a long to a double, you are able to use longer periods than 1s and get more precision in low frequencies.

With a MCLK/128 divider on the arduino due (84MHz) and 32 bit timers, you should be able to get periods of up to ~6544.7 seconds (0.00015279511 Hz)