1) Are you trying to make a clock to tell the time or a stopwatch?
2) Graphical or just write text?
Whatever type it is, you'll probably want to use SetTimer & GetSystemTime.
For a graphical clock (with hands) use parametric equations:
;s = seconds
;L = Lenght of hand
;k= (seconds / max seconds) * 2Pi radians per rotation
k = (s / 60) * (2 * Pi) = (s * Pi) / 30 [rad]
y = L + Lcos(k)
x = L + Lsin(k)
; Using FPU:
mov eax,[s]
push eax
fld dword [esp] ; st0 = s
pop eax
push dword 30
fld dword [esp] ; st0 = 30; st1 = s
pop eax
fdivp st1,st0 ; st0 = s/30
fldpi ; st0 = pi; st1 = s/30
fmulp st1,st0 ; st0 = (s* pi)/30
fsincos ; st0 = cos(k); st1 = sin(k)
fld1 ; st0 = 1; st1 = cos(k); st2 = sin(k)
fadd st1,st0 ; st0 = 1; st1 = 1+cos(k); st2 = sin(k)
faddp st2,st0 ;st0 = 1+cos(k); st1 = 1+sin(k)
mov eax,[L]
push eax
fld dword [esp] ; st0 = L; st1 = 1+cos(k); st2 = 1+sin(k)
fmul st1,st0 ; st0 = L; st1 = L + Lcos(k); st2 = 1 + sin(k)
fmulp st2,st0 ; st0 = L + Lcos(k); st1 = L + Lsin(k)
fstp dword [esp] ; st0 = L + Lsin(k)
pop eax
push eax
mov [y],eax
fstp dword [esp] ;
pop eax
mov [x],eax
I've just blasted that straight off so you might wanna check it, but all you have to do is add the clock's offset to [x] and [y]. You'll have to do this for each hand on the clock.
[EDIT]
This will make the clock 2L wide and 2L tall, to draw the hands draw a line from (L,L) to (x,y). To draw the hour or second locations as dots around the clock face do the same as above by making L,say, 2 pixels bigger and use setpixel(x,y) instead of lineto.
[/EDIT]
If you want to convert the values to decimal i can dig out my decimal function
HTH
