Or use a micro with real-time clock much easier still then you can control the delay programmatically even add LCD readout for elapsed and set minutes plus memory
My condolences to people in the USA who have lost thier lives in the recent breakout of terror our thoughts are with you at this present moment in time 
We hope you catch them "now you know how I feel about people who dish out high levels of violence I hate them!! Which is ironic when you think that what we do in return is exactly the same we do no different do we !! Mindless stupidity however killing innocent civilians is both despicable and appalling Cowards in the real sense of the word They deserve no mercy
Unfortunately who have we to blame and how little do we think when we place constructional plans on the net illustrating how to manufacture your very own personal anti personal land mines Not that we should not be able to see this but more importantly we should also be able to refrain from building such devices knowing full well what their capability is but then I guess that’s down to state of mind and what people must and will do in order to defend themselves Just mindless stupidity What else could you say to this given the technology that we have at hand
I guess now we not only need to know but also to recognize when we do see this Stupid and vastly ironic since in any war that evolves from these outbreaks of violance we send out men into so called zones of the world which seem to be a threat and in return we exchange fire killing innocent civilians in the process 
Does make you wonder doesent it Are we any different So much for engineering
I thought this was interesting as well it comes up with a password and logon id which i dont quite understand 
The title of the entry is:
Small 12v Auto circuit for on/off switch - Newbie help 
You can see the comment at the following URL:
https://www.eeweb.com/electronics-forum/small-12v-auto-circuit-for-onoff-switch-newbie-help/Theres your next bit of coding to work on Light level meters for close proximity You can choose to do what you want with this either negative or positive up to you !! Thinking yet 
[code]'****************************************************************
'* Name : LightMeter.BAS *
'* Author : MD Harrington *
'* Notice : Copyright (c) 2013 
@www.harrington.force9.co.uk *
'* : All Rights Reserved *
'* Date : 14/04/2013 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
Device = 16F84A 
Config RC_OSC , WDT_OFF , PWRTE_OFF, CP_OFF 
Xtal = 4 
On_Interrupt GoTo INTPROC
' Variable declaration 
Dim FLAGS As Byte 
Symbol T0IE = INTCON.5 ' TMR0 Overflow Interrupt Enable
Symbol T0IF = INTCON.2 ' TMR0 Overflow Interrupt Flag
Symbol GIE = INTCON.7 ' Global Interrupt Enable
Symbol PS0 = OPTION_REG.0 ' Prescaler ratio bit-0
Symbol PS1 = OPTION_REG.1 ' Prescaler ratio bit-1
Symbol PS2 = OPTION_REG.2 ' Prescaler ratio bit-2
Symbol PSA = OPTION_REG.3 ' Prescaler Assignment (1=assigned to WDT 0=assigned to oscillator)
Symbol T0CS = OPTION_REG.5 ' Timer0 Clock Source Select (0=Internal clock 1=External PORTA.4)
Symbol RPBU = OPTION_REG.7 ' weak pull ups clearing set these to on
Symbol LIGHTFLAG = FLAGS.0 ' Flag for detecting if we should check light intensity  
Dim LIGHTVAR As Word 
Dim REPEATS As Byte 
Dim PORTVAL As Byte 
Dim TMRCOUNT As Byte 
Dim NEWVAL As Byte 
Dim CURVAL As Byte 
GoTo Over_Int 
'--------------------------------------------------------------------------------------
' interrupt procedure starts here  
INTPROC:
Context Save 
If TMRCOUNT >= 0 And TMRCOUNT < 30 Then 
PORTB.7 = 1 
End If 
If TMRCOUNT >= 30 And TMRCOUNT< 60 Then 
PORTB.7 = 0 
End If 
If TMRCOUNT = 60 Then 
TMRCOUNT = 0 
End If 
TMRCOUNT = TMRCOUNT + 1 
T0IF = 0 ' clear the timer overflow flag 
T0IE = 0  
TMR0 = 0 ' clear the timer 
Context Restore 
Retfie
' this is the end of the interrupt service routine 
 ' ------------------------------------------------------------------------------------ 
Over_Int:
START:
GoSub INIT: ' call init this is the procedure that sets up ports etc 
MAIN:
High PORTA.2  
 LIGHTVAR = RCIn PORTA.2, High ' read the value from the LDR 
 ' store this in light value 
 GIE = 0 ' disable Global interupt here 
 T0IF = 0 ' clear the timer overflow flag 
 TMR0 =0 ' Clear the timer   
PORTVAL = LIGHTVAR.HighByte
' Assign to NEWVAL 
If PORTVAL > 0 And NEWVAL != PORTVAL Then 
NEWVAL = PORTVAL 
End If 
If NEWVAL = 0 Then 
 CURVAL = 0  
 Else If NEWVAL >= 1 And NEWVAL < 3 Then 
 CURVAL = 1 
 Else If NEWVAL >= 3 And NEWVAL < 5 Then 
 CURVAL = 3  
 Else If NEWVAL >= 5 And NEWVAL < 8 Then 
 CURVAL = 7 
 Else If NEWVAL >= 8 And NEWVAL < 11 Then 
 CURVAL = 15
 Else If NEWVAL >= 10 And NEWVAL < 14 Then 
 CURVAL = 31 
 Else If NEWVAL >= 14 And NEWVAL < 20 Then 
 CURVAL = 63 
 Else If NEWVAL >= 20 And NEWVAL < 30 Then 
 CURVAL = 127 
End If
DelayUS 50
PORTB = CURVAL 
T0IF = 0
GoTo MAIN 
INIT:
All_Digital = true ' turn off analogue module 
' clear all interrupt flags etc 
 Clear INTCON
 Clear PORTB ' make shure no output on port b
 Clear PORTA ' make shure no output on port a
 Clear PORTVAL ' Clear PORTVAL variable 
 Clear OPTION_REG ' Clear option register 
'clear all the variables
CURVAL =$00
NEWVAL =$00 
LIGHTVAR = $00
LIGHTFLAG = 0 
TMRCOUNT = $00
TRISB = $00 ' make all port B output 
' Set up the prescaler 
' 15 times per second prescaler setting so in 30 counts 2s econds will elapse 
' 15 counts 1 second has elapsed 
 PS0 = 1
 PS1 = 1
 PS2 = 0
 PSA = 0
' start interrupt procedure  
 RPBU = 0
 TMR0 = $00 
Return  
[/code]