Returns hours or minutes or seconds or all together
--usage getSystemTime
--returns a string with one of... full time or hours or minutes or seconds
--getSystemTime(request)
--request, required. Must be a symbol. Valid requests are:
--#all... returns full time in format "hh:mm:ss"
--#h... returns zeropadded string with hours
--#m... returns zeropadded string with minutes
--#s... returns zeropadded string with seconds
--errorcodes
-- -1 = request is not of type symbol
-- -2 = request value is other than valid. see usage
on getSystemTime request
if symbolP(request) = 1 then
tTime = [:]
t = framestoHMS(the systemdate.seconds,1,0,0).char[2..9]
tTime.addProp(#all, t)
tTime.addProp(#h, t.char[1..2])
tTime.addProp(#m, t.char[4..5])
tTime.addProp(#s, t.char[7..8])
if voidp(tTime[request]) then return -2
return tTime[request]
else
return -1
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA