(setq star_time1(getvar"cdate")) ;开始时间 (setq end_time2(getvar"cdate")) ;结束时间 (setq use_time(- end_time2 star_time1)) (setq use_time(rtos use_time 2 6)) (setq use_time_cd(STRLEN use_time)) (setq bc 1) (setq rq "" sj "" mgzj "") ;rq日期 sj时间 mgzj每个字节 (while (/= bc (1+ use_time_cd)) (setq mgzj(SUBSTR use_time bc 1)) (if (/= mgzj ".") (progn (setq rq(STRCAT rq mgzj)) (setq bc(1+ bc)) ) (progn (setq sj(substr use_time (1+ bc))) (setq bc(1+ use_time_cd)) ) ) )
(Print rq) (print sj) (print "--------------") (setq rqcd(strlen rq)) (setq xs(substr sj 1 2)) ;小时xs (setq fz(substr sj 3 2)) ;分钟fz (setq mz(substr sj 5 2)) ;秒钟mz (setq ys(strcat "程序用时:" rq "天" xs "小时" fz "分钟" mz "秒钟")) ;用时 (print ys)
|