An attempt to provide a Real Time Clock for the nRF51-DK. This code provides rtc.time and rtc.set_time replacements for the similarly named C standard methods (unimplemented for nRF51-DK last I checked). Not very well tested, but it seems to work for simple applications.
Dependents: nRF51_rtc_example LoRa_PIR BLE_Lightning_sensor BLE_AlarmWatch ... more
Fixed clock drift
Calling time() often will cause clock drift by forgetting the fractional part of the seconds (ticks.) Fixed by offsettin rtc_previous by the number of "unused" ticks.