So here's a little description:
I made a working clock for this little app of mine and was quite happy with it. But just as in some games, I want the user to be able to specify the speed of the game. So I nixed the idea of using the timer() function and started building a new clock off of IanM's functions pertaining to tickers.
in the do/loop:
If TICKER EXIST(1)=0
MAKE TICKER 1, 1000
endif
Ticked=(Ticker(1))
If MouseCLICK()=0 and ShiftKey()=0
TTime#=1000
if set1=0 or set1=2
SET TICKER RATE 1, TTime#
set1=1
endif
endif
If MouseCLICK()=0 and ShiftKey()=1
if set1=1 or set1=0
TTime#=250
SET TICKER RATE 1, TTime#
set1=2
endif
endif
TIMER$=GetTime(TTime#, ticked)
function:
Function GetTime(Clock_Speed as float, tick as float)
NewTick = tick
If oldtick <> newtick
If oldtick < newtick
tick#=tick#+1
endif
If oldtick > newtick
tick#=tick#
endif
endif
Oldtick=tick
seconds#=wrap(tick#, 0, 60)
minutes#=wrap(seconds#, 0, 60)
hours#=wrap(minutes#,1, 24)
days#=wrap(hours#, 0, 6)
If seconds#<10 then StrSAdd$="0"
If seconds#>10 then strsadd$=""
If minutes#<10 then strMadd$="0"
if minutes#>10 then strMadd$=""
if hours#<10 then strHadd$=" "
if Hours#>10 then strHadd$=""
If hours#>12
Ampm$=" PM"
Hours#=Hours#-12
endif
If hours#<12
Ampm$=" AM"
ENDIF
Select Days#
Case 0 :
Day$="Monday"
endcase
Case 1 :
Day$="Tuesday"
endcase
Case 2 :
Day$="Wednesday"
endcase
Case 3 :
Day$="Thursday"
endcase
Case 4 :
Day$="Friday"
endcase
Case 5 :
Day$="Saterday"
endcase
Case 6 :
Day$="Sunday"
endcase
EndSelect
Time$=StrHAdd$+Str$(int(Hours#))+":"+strMadd$+Str$(int(minutes#))+":"+StrsAdd$+Str$(int(seconds#))+AMPM$+", Today is "+Day$
ENDFUNCTION Time$ NOTE - clock_time is not used anymore, tick = a value of one or zero which is returned from the checker (ticked) in the main do/loop.
Anyone care to explain why I am reporting no change or update to the clock? I am a little confused.
Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
