DIM p$
(30), t!
(30), t$
(30), x
(1), y
(1) white&
= _RGB32(200, 200, 200)
begin:
h
= VAL(MID$(t$
, 1, 2)) + 7 ' GMT = local + 7FOR i
= 1 TO 30 ' actual time for each place tm
= m
+ z!
* 60 * SGN(t!
(i
)) IF tm
< 0 THEN tm
= tm
+ 60: th
= th
- 1 IF tm
> 59 THEN tm
= tm
- 60: th
= th
+ 1 t$(i) = th$ + tm$
sort:
sorted = 1
s = 0
IF p$
(i
) > p$
(i
+ 1) THEN s
= 1 IF t$
(i
) > t$
(i
+ 1) THEN s
= 1 SWAP p$
(i
), p$
(i
+ 1) ' place SWAP t!
(i
), t!
(i
+ 1) ' zone SWAP t$
(i
), t$
(i
+ 1) ' time sorted = 0
d = 33: p = 0 ' distance, place index
x1 = xc - d - 18: y1 = yc - d
x2 = xc + d + 18: y2 = yc + d + 18
LINE (x1
, y1
)-(x2
, y2
), black&
, BF
' erase old p = p + 1 ' place index
CIRCLE (x1
, y1
), 1, white&
' ticks tm
= VAL(MID$(t$
(p
), 3, 2)) ' minute r!
= _D2R(tm
* 6 - 90) ' minute hand x
(0) = xc
+ (d
- 8) * COS(r!
) y
(0) = yc
+ (d
- 8) * SIN(r!
) r!
= _D2R((th
+ tm
/ 60) * 30 - 90) ' hour hand x
(1) = xc
+ (d
- 16) * COS(r!
) y
(1) = yc
+ (d
- 16) * SIN(r!
) FOR zz
= 0 TO 1 ' draw hands LINE (xc
+ zx
, yc
+ zy
)-(x
(zz
), y
(zz
)), white&
LINE (10, 470)-(630, 471), black&
, BF
' erase seconds bar at bottom LINE (10, 470)-(x
, 471), green&
, B
' seconds bar IF i$
= " " THEN stype
= 1 - stype
' spacebar changes sort (time or place)