On dark turn Led on and off in an hr

So where is something that indicates you have been on for an hour, and are now waiting for daylight to occur?

i.e.
if (ldrValue<=512 && waiting_for_day == 0){ // finally dark out, and has not been daylight yet
turn on LED, start darkStart timer
waiting_for_day = 1; // don't start 1 hour again until its daylight
}
if ( (darkStart +duration)>=millis() ) {
turn off LED
}
if ( ldrValue >=512){
waiting_for_day = 0; // daytime, can look for nighttime now
}