Hi,
Please refer the Battery service profile. Same example.
/* Start battery measurements */
TMR_StartLowPowerTimer(mBatteryMeasurementTimerId, gTmrLowPowerIntervalMillisTimer_c,
TmrSeconds(mBatteryLevelReportInterval_c), BatteryMeasurementTimerCallback, NULL);
The service will be really helpful for your implementation
Regards,
Mario