# RTC Light Timer Example?

**URL:** https://community.particle.io/t/rtc-light-timer-example/32435
**Category:** General
**Created:** [May 6, 2017, 5:52pm UTC](https://community.particle.io/t/rtc-light-timer-example/32435 "2017-05-06T17:52:53Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)
#### Post date: [May 6, 2017, 7:04pm UTC](https://community.particle.io/t/rtc-light-timer-example/32435/2 "2017-05-06T19:04:46Z")

</div>

You may want to look into this

> [@Battery saving help](https://community.particle.io/t/battery-saving-help/32240/12):
>
> Actually I would not check for a specific hour alone. Imagine what is if your device wakes up between 3am and 9am for some reason? Then the device would not go back to sleep or if this happens at 2:59am, the device would wake again 59 minutes too late. Hence I’d do things slighty different Knowing that Time.local() returns the local date/time in seconds allows for easy range checks by use of the fact, that a day has 86400 seconds const int secGo2Sleep = 02\*3600 + 00\*60 + 00; // 00 minutes a…

You don't need to use `System.sleep()` but can do anything you want in that `true` or `false` branch.

---

_[View the full topic](https://community.particle.io/t/rtc-light-timer-example/32435)._
