ID:141407
 
Code:
        TimeKeep()
while(world)
sleep(60)
minutes += 1
if(minutes == 60)
minutes = 0
hours += 1

TimeKeep2()
while(world)
sleep(2)
if(hours == 13)
hours = 1
if(hours == 4&&minutes == 30&&time == "AM")
for(var/turf/Grass/G)
G.overlays += /obj/items/SortaNight
G.overlays -= /obj/items/Night
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/SortaNight
S.overlays -= /obj/items/Night
timeofday = "Dawn"
world <<"The sun begins to rise. It is now dawn."
if(hours == 11&&minutes == 10&&time == "AM")
for(var/turf/Grass/G)
G.overlays -= /obj/items/Night
G.overlays -= /obj/items/SortaNight
for(var/turf/Sidewalk/S)
S.overlays -= /obj/items/Night
S.overlays -= /obj/items/SortaNight
timeofday = "Afternoon"
world <<"The sun shines in the sky. It is now the afternoon."
if(hours == 8&&minutes == 0&&time == "PM")
for(var/turf/Grass/G)
G.overlays += /obj/items/SortaNight
G.overlays -= /obj/items/Night
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/SortaNight
S.overlays -= /obj/items/Night
timeofday = "Dusk"
world <<"The sun slowly descends. It is now dusk."
if(hours == 11&&minutes == 0&&time == "PM")
for(var/turf/Grass/G)
G.overlays += /obj/items/Night
G.overlays -= /obj/items/SortaNight
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/Night
S.overlays -= /obj/items/SortaNight
timeofday = "Night"
world <<"The sun sinks below, and the world is plunged into darkness."
if(hours == 12&&minutes == 0)
if(time == "PM")
time = "AM"
else
time = "PM"


Problem description:
I set the time to just before dusk, and wait a minute. Nothing happens. It zooms right on by 8:00 PM and does nothing. I try setting it to 11:59 AM. Nothing. It doesn't change to PM. Nor the other way around.
sleep(60) = 6 second delay. You want sleep(600).
In response to Kaiochao
No, I don't. It's not real-time. By 'actual time' I meant the changing of the days.
It seems to me having two seperate procs like that is the cause of your problem

Reason being is they're not in sync, the 2nd proc checks 5 times a second, while the other checks once every 6 seconds. When you set it to just before midnight, the second one never got a chance to call

world/New()
spawn(60) world.TimeKeep()

world
proc
TimeKeep()
while(world)
minutes += 1
if(minutes == 60)
minutes = 0
hours += 1
if(hours == 13)
hours = 1
if(hours == 4&&minutes == 30&&time == "AM")
for(var/turf/Grass/G)
G.overlays += /obj/items/SortaNight
G.overlays -= /obj/items/Night
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/SortaNight
S.overlays -= /obj/items/Night
timeofday = "Dawn"
world <<"The sun begins to rise. It is now dawn."
if(hours == 11&&minutes == 10&&time == "AM")
for(var/turf/Grass/G)
G.overlays -= /obj/items/Night
G.overlays -= /obj/items/SortaNight
for(var/turf/Sidewalk/S)
S.overlays -= /obj/items/Night
S.overlays -= /obj/items/SortaNight
timeofday = "Afternoon"
world <<"The sun shines in the sky. It is now the afternoon."
if(hours == 8&&minutes == 0&&time == "PM")
for(var/turf/Grass/G)
G.overlays += /obj/items/SortaNight
G.overlays -= /obj/items/Night
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/SortaNight
S.overlays -= /obj/items/Night
timeofday = "Dusk"
world <<"The sun slowly descends. It is now dusk."
if(hours == 11&&minutes == 0&&time == "PM")
for(var/turf/Grass/G)
G.overlays += /obj/items/Night
G.overlays -= /obj/items/SortaNight
for(var/turf/Sidewalk/S)
S.overlays += /obj/items/Night
S.overlays -= /obj/items/SortaNight
timeofday = "Night"
world <<"The sun sinks below, and the world is plunged into darkness."
if(hours == 12&&minutes == 0)
if(time == "PM")
time = "AM"
else
time = "PM"
sleep(60)
In response to Mista-mage123
They were synced before and it didn't work, but I'll try this. Thanks!