home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
me34src.zip
/
me3
/
mutt
/
builtin
/
mltime.mut
< prev
next >
Wrap
Text File
|
1995-01-14
|
635b
|
34 lines
;; mltime.mut : Display the current time in the mode line
(include me.mh)
(defun
display-time ;; toggle modeline clock
{
(if (unregister-hook IDLE-HOOK "show-time")
{
(modeline-time "") ;; turning off the clock
FALSE
}
{
(show-time) ;; turning on the clock
(register-hook IDLE-HOOK "show-time")
TRUE
})
}
show-time
{
(small-int month day year hh mm ss) ;; TimeInfo
(bool pm)
(read-clock (loc month))
(if (pm (< 12 hh)) { (-= hh 12)(pm TRUE) })
(modeline-time
(concat
hh
":" (if (< mm 10) "0" "") mm
; ":" (if (< ss 10) "0" "") ss
(if pm "p" "a") "m"))
}
)