TGC Codebase Backup



RealTimeClock by Anonymous Coder

29th Jun 2004 0:11
Summary

--Just a simple clock-- [My first post, got more but working out bugs..]



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    set text font "Lucida Console"
set text size 16 : set text to bold


`main loop
do
 clock(hours)
loop

`Clock Function
function Clock(hours)
sync
 cls
 hours = val(left$(get time$(),2))
 if hours > 12
    hours=hours - 12
 endif
 if hours = 0
    hours=hours + 12
 endif
 center text screen width()/2,screen height()/2, "Time:["+Str$(hours) + right$(get time$(),6)+"]" 
endfunction