Get day seconds example

get_day_seconds example

Users of this script snippet will probably want to remove the chatty comments :)

rem Wait until a specific time of day before continuing
rem Author Mike McCabe nickname-for-michael at-sign mcca dot be

@title Wait until
@param d Start hr
@default d 0
@param e Start min (0 to skip timer)
@default e 0

if e<>0 then gosub "snooze"

print "The time has come."


print "snooze till ", d, ":", e
sleep 3000

rem Note Fingalo syntax
z = get_day_seconds

print "time is ", z, "mins into day"
sleep 3000
print "reqd time is ", y, "mins into day"
sleep 3000
if y<z then goto "snoozanmore"
print "normal case"
sleep 3000
print "snooze for ", y, "mins"
sleep 3000
sleep y*60*1000
goto "goback"

print "time is earlier case"
sleep 3000
rem z is now mins left in day
print z, " mins left in day"
sleep 3000
print y, " mins after that"
sleep 3000
print "sleeping ", z+y, " mins"
sleep 3000
sleep z*60*1000+y*60*100 
goto "goback"
Community content is available under CC-BY-SA unless otherwise noted.